Using ActionScript 3.0 Components |
|
|
|
| Using the FLVPlayback Component > Using the FLVPlayback component > Creating an application with the FLVPlayback component | |||
You can include the FLVPlayback component in your application in the following ways:
source parameter. FLVPlayback() constructor to dynamically create an FLVPlayback instance on the Stage, assuming the component is in the library. |
NOTE |
If you create an FLVPlayback instance with ActionScript, you must also assign a skin to it by setting the |
To drag the FLVPlayback component from the Components panel:source parameter on the Parameters tab of the Component inspector, and enter a string that specifies one of the following:
For information on how to create a SMIL file to describe one or more FLV files, see Using a SMIL file.
skin parameter. |
NOTE |
In the first two cases, a preview of the skin appears in the viewing pane above the pop-up menu. You can use the Color picker to change the color of the skin. To change the color of a custom UI control, you must customize it. For more information on using custom UI controls, see Skinning FLV Playback Custom UI components individually |
The following procedure uses the Video Import wizard to add an FLVPlayback component:
To use the Video Import wizard:|
WARNING |
Do not select the Embed Video option. The FLVPlayback component plays only external streaming video. This option will not place an FLVPlayback component on the Stage. |
|
NOTE |
In the first two cases, a preview of the skin appears in the viewing pane above the pop-up menu. |
The following procedure adds the FLVPlayback component using ActionScript.
To create an instance dynamically using ActionScript:install_drive to the drive on which you installed Flash and modify the path to reflect the location of the Skins folder for your installation:
On a Windows computer:
import fl.video.*;
var my_FLVPlybk = new FLVPlayback();
my_FLVPlybk.x = 100;
my_FLVPlybk.y = 100;
addChild(my_FLVPlybk);
my_FLVPlybk.skin = "file:///install_drive|/Program Files/Adobe/Adobe Flash CS3/en/Configuration/FLVPlayback Skins/ActionScript 3.0/SkinOverPlaySeekMute.swf"
my_FLVPlybk.source = "http://www.helpexamples.com/flash/video/water.flv";
On a Macintosh computer:
import fl.video.*; var my_FLVPlybk = new FLVPlayback(); my_FLVPlybk.x = 100; my_FLVPlybk.y = 100; addChild(my_FLVPlybk); my_FLVPlybk.skin = "file:///Macintosh HD:Applications:Adobe Flash CS3:Configuration:FLVPlayback Skins:ActionScript 3.0SkinOverPlaySeekMute.swf" my_FLVPlybk.source = "http://www.helpexamples.com/flash/video/water.flv";
|
NOTE |
If you do not set the |
|
|
|
|