Using the Video Widget (download example Flash file and video file for experimenting with)

The flash file above is an example of the AnalogIn widget being used to control a video file via the VideoControl widget (Note: Don't forget to start the Netlab Hub before you start testing these movies). The video file in this folder has already been prepared for use with the NetLab toolkit. The instructions for doing this can be found here: (look for the section on preparation of video).

The Flash movie has an instance of the AnalogIn widget with the instance name of touch and an instance of the VideoControl widget. The green rectangle that you can see in the picture below is a Flash video object.


To create a Flash video object you need to click on the Library pop-up menu and select New Video. You will then have a video object in your library (it will look like the remix library item in the picture below but will have whatever name you chose to give it).
If you were creating this movie from scratch you would drag this new video object from the library and place it on the stage. You would then select your video object on the stage and give it an instance name in the property inspector. For example, in the picture below the video object has been given the instance name of remix_vid.


Once you have your two widgets and your video object on the stage you can then set the VideoControl widget parameters so that the three items are linked. This is also where you tell the widget which video file to play.
  • Set the input source to be the instance name of the AnalogIn widget.
  • Set the videoFileName to be the name of the video file that you want to control with this widget. Note: You are linking to an external file here so you must make sure that your FLA file and video file are in the same folder. If you use sub-folders, like the example does, then you need to include that sub-folder in the name you enter as the videoFileName, e.g. video/viralNetLab.f4v.
  • Lastly, set the videoObjectName to be the instance name of your video object.

The videoBehaviour menu is where you choose how your analog data is going to control your video. See the NetLab website for a full description of these settings and have a play with the example file to help you understand how they work. The example file is set so that when the AnalogIn signal reaches above 500 the video will start to play. If the signal goes below 500 it will stop. If the signal goes above 500 the video will start playing again from the beginning.

To see this in action you do not need to have the Lilypad and a sensor connected. When you test movie you can manually control the values being sent to the VideoControl widget by sliding the slider on the AnalogIn widget. Note: You still need to have the NetLab hub running.

Using the Sound Control Widget (download example Flash files and sound files for experimenting with)

In order to use the soundControl widget you first need to create your sound files and save them in MP3 format. The basic setup in Flash to control sound with data from an AnalogIn widget is very similar to the videoControl widget but you do not need any extra flash objects for sound. The two examples that I have created for you each do something more than a basic link between an AnalogIn widget and a SoundControl widget. Before you look at them, try to create a basic setup yourself to play one of the MP3 files in the Sound Examples folder.

Next, take a look at the soundControlEnvelope movie. This movie places an envelope widget between the AnalogIn source and the SoundControl widget. This envelope fades a single sound file in and out. Click on each of the widgets and observe their component settings. Then test the movie and play with the AnalogIn slider to see what happens to the sound file.

The next movie uses a list contained in a text file and the ListItems widget to make the sound control widget play through a sequence of files. The list file (pictured below) contains the file path for each of the harp sounds separated by a comma. There are no spaces in this list. You would use an application like Text Edit in Plain Text mode to create this file.

As before, take a look at the component settings for each of the widgets and then test the movie. Listen to and watch what happens when you slide the analog slider.

For more information on sound control see the NETLab website: