Creating a progress bar for loading FLV files with
ActionScript
You can create a progress bar to display the loading progress of an FLV file. For information
on loading FLV files into a SWF file, see
information about FLV files and Flash, see
The following example uses the Drawing API to create a progress bar. The example also uses
the
and
bytesLoaded
the video object instance called
to show information about the loading progress.
To create a progress bar that shows loading progress:
1.
Create a new FLA file called flvProgress.fla.
2.
In the Library panel (Window > Library), select New Video from the Library
pop-up menu.
3.
In the Video Properties dialog box, name the video symbol and select Video (ActionScript
controlled).
4.
Click OK to create a video object.
5.
Drag the video object from the Library panel to the Stage to create a video object instance.
6.
With the video object selected on the Stage, type my_video in the Instance Name text box
in the Property inspector (Window > Properties > Properties).
7.
With the video instance selected, type 320 into the width text box and 213 into the height
text box.
630
Working with Images, Sound, and Video
"Preloading FLV files" on page
"About using FLV video" on page
properties to show the loading progress of video1.flv into
bytesTotal
. The
my_video
text field is dynamically created
loaded_txt
609. For other
603.
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?