About the Video class
This section includes recommendations for optimizing your use of the Video class, including
tips on dynamically creating Video objects.
For more information about video, see
Chapter 4, "Working With Media Files."
About creating Video objects dynamically
You can add Video objects to your application only from within the Flash authoring
environment, by dragging an embedded Video object from the Library panel to the Stage.
However, if you want to implement video objects from within your ActionScript code, you
can do so by embedding them in a movie clip. This technique lets you create and remove
video objects dynamically using the
and
duplicateMovieClip()
removeMovieClip()
methods.
Understanding frame rates
If you embed an FLV file in a Flash application in a static SWF file, its frame rate will be the
same as the frame's playback rate in the timeline. When you stream the data in an FLV, the
video played through Flash Media Server can have a different frame rate than the SWF that
contains it.
For example, suppose you use another application to output a Broadband FLV file with a 15
fps frame rate. If you import this FLV file into a 6 fps Flash application (SWF file), then the
video will not be synchronized, because the two frame rates are different. However, if instead
you use Flash Media Server to stream the FLV file into the same 6 fps SWF file, it will be
synchronized to 15 fps, because streaming files do not use frame-based playback.
56
Using Media Classes
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-DEVELOPING MEDIA and is the answer not in the manual?
Questions and answers