Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Creative Suite

  • Print
  • + Share This
From the author of

Connecting FLVPlayback Custom UI Components

After your custom UI components are placed on the Flash stage, you then must write some simple ActionScript to connect the FLVPlayback custom UI components to your instance of the FLVPlayback component.

First, you must assign a name to the FLVPlayback instance and then use ActionScript to assign your FLVPlayback custom UI component instances to the corresponding FLVPlayback properties (see Figure 8).

Figure 8

Figure 8 It is important that you provide an instance name in the Property inspector to each custom UI component.

In the following script example, the FLVPlayback instance is my_FLVPlybk, the FLVPlayback property names follow the periods (.), and the FLVPlayback custom UI control instance names you entered in the Property inspector are to the right of the equal (=) signs:

//FLVPlayback instance = my_FLVPlybk
my_FLVPlybk.playButton = playbtn; // set playButton property to playbtn, etc.
my_FLVPlybk.pauseButton = pausebtn;
my_FLVPlybk.playPauseButton = playpausebtn;
my_FLVPlybk.stopButton = stopbtn; 
my_FLVPlybk.muteButton = mutebtn;
my_FLVPlybk.backButton = backbtn;
my_FLVPlybk.forwardButton = forbtn;
my_FLVPlybk.volumeBar = volbar;
my_FLVPlybk.seekBar = seekbar;
my_FLVPlybk.bufferingBar = bufbar; 

In other words, the FLVPlayback property names to the left of the equal signs must always be spelled as written here; custom UI control instance names to the right of the equal signs must always match the names you typed in the instance name text field in the Property inspector.

  • + Share This
  • 🔖 Save To Your Account