630
Working with Images, Sound, and Video
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
“Preloading FLV files” on page 609
. For other
information about FLV files and Flash, see
“About using FLV video” on page 603
.
The following example uses the Drawing API to create a progress bar. The example also uses
the
bytesLoaded
and
bytesTotal
properties to show the loading progress of video1.flv into
the video object instance called
my_video
. The
loaded_txt
text field is dynamically created
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.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...