16.
Publish the SWF file (File > Publish) and transfer it to your device for testing.
You must test device video on the actual device; you can't preview it in the emulator.
Using external device video
In addition to playing video that's bundled in the SWF file (see
on page
58), you can also play external video files that reside on the device's memory card or
that come from a network address. As with bundled device video, the device is responsible for
decoding the device video.
To play an external video file, you pass the absolute or relative file location or URL of the
video file to the
Video.play()
file are located in the same folder on the device.
myVideo.play("ocean.3gp");
You can also specify a relative folder path to the SWF file, as follows:
myVideo.play("folder1/folder2/ocean.3gp"); //
Depending on the device, you can also use the
specific location, as follows:
myVideo.play("file://c:/folder1/folder2/ocean.3gp");
Not all devices support the
devices if you use this protocol.
You can also load a video file from a network address, as follows:
myVideo.play("http://www.macromedia.com/video/ocean.3gp");
Viewing and editing device video symbol properties
The Video Properties dialog box lets you view and edit information for video symbols in the
Library panel.
To open the Video Properties dialog box, do one of the following:
Right-click (Windows) or Control-click (Macintosh) a video symbol in the Library panel
■
and choose Properties from the context menu.
Select a video symbol in the Library panel and choose Properties from the options menu
■
in the panel's title bar.
method. In the following example, the SWF file and the 3GP
file://
protocol. Be sure to test your application on all target
file://
"Using bundled device video"
protocol to play a video file at a
Using device video
65
Need help?
Do you have a question about the FLASH 8-DEVELOPING FLASH LITE 2.X and is the answer not in the manual?
Questions and answers