MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 555

Components language reference
Table of Contents

Advertisement

Example
The following example adds two ActionScript cue points to an FLV file. The example adds
the first one using a
CuePoint
parameters. When each cue point occurs while playing, a listener for cuePoint events shows
the value of the
playheadTime
Drag an FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk. Drag a TextArea component to the Stage below the FLVPlayback instance,
and give it an instance name of my_ta. Then add the following code to the Actions panel on
Frame 1 of the Timeline:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
- TextArea component on the Stage with an instance name of my_ta
*/
import mx.video.*;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
water.flv";
my_ta.visible = false;
// create cue point object
var cuePt:Object = new Object(); // create cue point object
cuePt.time = 2.444;
cuePt.name = "ASCuePt1";
cuePt.type = "actionscript";
my_FLVPlybk.addASCuePoint(cuePt);
// add 2nd AS cue point using time and name parameters
my_FLVPlybk.addASCuePoint(5, "ASCuePt2");
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
my_ta.text = "Elapsed time in seconds: " + my_FLVPlybk.playheadTime;
my_ta.visible = true;
};
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
See also
FLVPlayback.findCuePoint()
FLVPlayback.addEventListener()
Availability
Flash Player 8.
Edition
Flash Professional 8.
parameter and the second one using the
property in a text area.
//add AS cue point
,
FLVPlayback.removeASCuePoint()
and
time
name
FLVPlayback class
553

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents