You
can include the FLVPlayback component in your application in the
following ways:
-
Drag the FLVPlayback component from the Components panel
to the Stage, and specify a value for the
source
parameter.
-
Use the Video Import wizard to create the component on the
Stage, and customize it by selecting a skin.
-
Use the
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
skin
property with ActionScript. When
you apply a skin this way, it is not automatically published with
the SWF file. You must copy both the application SWF file and the
skin SWF file to your application server or the skin SWF file won’t
be available when you run the application.
Drag the FLVPlayback component from the Components panel
-
In the Components panel, click the Plus (+) button to open
the video entry.
-
Drag the FLVPlayback component to the Stage.
-
With the FLVPlayback component selected on the Stage, locate
the Value cell for the
source
parameter on the
Parameters tab of the Component inspector, and enter a string that
specifies one of the following:
-
A local path to a
video file
-
A URL to a video file
-
A URL to a synchronized Multimedia Integration Language (SMIL)
file that describes how to play a video file
For information
on how to create a SMIL file to describe one or more FLV files,
see
Use a SMIL file
.
-
On the Parameters tab in the Component inspector, with the
FLVPlayback component selected on the Stage, click the Value cell
for the
skin
parameter.
-
Click the magnifying glass icon to open the Select Skin dialog
box.
-
Select one of the following options:
-
From the
drop-down Skin list, select one of the predesigned skins to attach a
set of playback controls to the component.
-
If you created a custom skin, select Custom Skin URL from
the pop-up menu, and enter, in the URL box, the URL for the SWF
file that contains the skin.
-
Select None, and drag individual FLV Playback Custom UI components
to the Stage to add playback controls.
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
Skin FLV Playback Custom UI components individually
.
-
Click OK to close the Select Skin dialog box.
-
Select Control > Test Movie to execute the SWF
file and start the video.
The following procedure uses the Video Import
wizard to add an FLVPlayback component:
Use the Video Import wizard:
-
Select File >
Import > Import Video.
-
Indicate the location of the video file by selecting one
of the following options:
-
Depending on your choice, enter either the path or the URL
that specifies the location of the video file, then click Next.
-
If you selected a file path, you’ll see a Deployment dialog
box next in which you can select one of the options listed to specify
how you would like to deploy your video:
-
Progressive
download from a standard web server
-
Stream from Flash Video Streaming Service
-
Stream from Flash Media Server
-
Embed video in a SWF file and play in the Timeline
Important:
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.
-
Click Next.
-
Select one of the following options:
-
From the
drop-down Skin list, select one of the predesigned skins to attach a
set of playback controls to the component.
-
If you created a custom skin for the component, select Custom
Skin URL from the pop-up menu, and enter the URL for the SWF file
that contains the skin in the URL box.
-
Select None, and drag individual FLV Playback Custom UI components
to the Stage to add playback controls.
Note:
In
the first two cases, a preview of the skin appears in the viewing
pane above the pop-up menu.
-
Click OK to close the Select Skin dialog box.
-
Read the Finish Video Import dialog box to note what happens
next, and then click Finish.
-
If you have not saved your FLA file, a Save As dialog box
appears.
-
Select Control > Test Movie to execute the SWF,
and start the video.
The following procedure adds the
FLVPlayback component using ActionScript.
Create an instance dynamically using ActionScript:
-
Drag
the FLVPlayback component from the Components panel to the Library panel
(Window > Library).
-
Add the following code to the Actions panel on Frame 1 of
the Timeline. Change
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 CS5/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 CS5: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
source
and
skin
properties,
the generated movie clip appears to be empty.
-
Select Control > Test Movie to execute the SWF
file and start the video file.
|
|
|