The method includes disabled cue points in the search. Use the
method to determine if a cue point is disabled.
Example
The following example adds two ActionScript cue points to an FLV file, and then calls the
method three times. The first call looks for a navigation cue point with a
findCuePoint()
time of 7.748. The second call looks for cue point
third call uses a cue point object that specifies both a time,
the third call, the example shows the content of the returned cue point object, including the
array of cue points that were searched, which, in this example, were ActionScript cue points.
Drag an FLVPlayback component to the Stage, and give it an instance name of
my_FLVPlybk. 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
*/
// create cue point object
import mx.video.*;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
var cuePt:Object = new Object();
var rtn_cuePt:Object = new Object(); // create object for return value
cuePt.time = 4.444;
cuePt.name = "AScue1";
my_FLVPlybk.addASCuePoint(cuePt);
// add 2nd AS cue point using time and name parameters
my_FLVPlybk.addASCuePoint(10, "AScue2");
// find navigation cue point using time
rtn_cuePt = my_FLVPlybk.findCuePoint(7.748, FLVPlayback.NAVIGATION);
//find actionscript cue point using name only
rtn_cuePt = my_FLVPlybk.findCuePoint("AScue1");
//find actionscript cue point using cue point object
cuePt.time = 10;
cuePt.name = "AScue2";
rtn_cuePt = my_FLVPlybk.findCuePoint(cuePt, FLVPlayback.ACTIONSCRIPT);
// see what returned cue point object contains
for (i in rtn_cuePt) {
//if an array object, open it up and trace contents
if (typeof rtn_cuePt[i] == "object") {
tracer(rtn_cuePt[i]);
// else trace name (i) and value (rtn_cuePt[i]) pair
} else {
trace(i+ " " + rtn_cuePt[i]);
}
}
588
FLVPlayback Component (Flash Professional Only)
isFLVCuePointEnabled()
, using only a name value. The
"ASCue1"
, and a name,
10
//add AS cue point
. After
"ASCue2"
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers