EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 614

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
614 Working with Images, Sound, and Video
Using embedded cue points with the FLVPlayback
component (Flash Professional only)
You can view cue points for an FLV file in the Property inspector when you use the
FLVPlayback component. After you set the
contentPath property for the FLVPlayback
instance, you can view any cue points that are embedded in the video file. Using the
Parameters tab, find the
cuePoints property, and click the magnifying glass icon to see a list
of the cue points in the file.
The following example shows how to use cue point information with the FLVPlayback
component.
To use cue points with the FLVPlayback component:
1. Create a new Flash document called cueFlv.fla.
2. Open the Components panel (Window > Components), and drag an instance of the
FLVPlayback and TextArea components to the Stage.
3. Select the TextArea component, and type my_ta in the Instance Name text box in the
Property inspector (Window > Properties > Properties).
4. With the TextArea component still selected, type 200 in the width text box and 100 in the
height text box.
5. Select the FLVPlayback instance on the Stage, and then type my_flvPb in the Instance
Name text box.
6. Select Frame 1 on the Timeline, and type the following code in the Actions panel.
var my_flvPb:mx.video.FLVPlayback;
var my_ta:mx.controls.TextArea;
my_flvPb.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object) {
my_ta.text += "Elapsed time in seconds: " + my_flvPb.playheadTime +
"\n";
};
my_flvPb.addEventListener("cuePoint",listenerObject);
NOTE
To see the cue points on the Parameters tab, you must type the name of your FLV file in
the contentPath text box instead of using code to assign the contentPath.

Table of Contents

Related product manuals