ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.removeASCuePoint() | |||
Flash Player 8.
Flash Professional 8.
my_FLVplybk.removeASCuePoint(CuePoint:Object):Object my_FLVplybk.removeASCuePoint(time:Number):Object my_FLVplybk.removeASCuePoint(name:String):Object
CuePoint A cue point object containing the time and name properties for the cue point to remove. The method does not check any other properties on the incoming cue point object. If time or name is null or undefined, the method uses only the available property. If only name is given, the method removes the first cue point with this name.
time A number containing the time of the cue point to remove. The method removes the first cue point with this time.
name A string that contains the name of the cue point to remove. The method removes the first cue point with this name.
The cue point object that was removed. If there is no matching cue point, the method returns null.
Method; removes an ActionScript cue point from the currently loaded FLV file. Only the name and time properties are used from CuePoint parameter to find the cue point to remove.
If multiple ActionScript cue points match the search criteria, only one is removed. To remove all, call this function repeatedly in a loop with the same parameters until it returns null.
Cue point information is wiped out when the contentPath property is set, so to set cue point information for the next FLV file to be loaded, set the contentPath property first.
The following example adds an ActionScript cue point to the FLV file, and then calls the removeASCuePoint() method to remove it. It shows the name of the removed cue point in the Output panel.
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
*/
import mx.video.*;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
// create cue point object
var cuePt:Object = new Object(); // create cue point object
var rtn_cuePt:Object = new Object(); // create object for return value
cuePt.time = 4.444;
cuePt.name = "ripples";
my_FLVPlybk.addASCuePoint(cuePt); // add AS cue point
if ((rtn_cuePt = my_FLVPlybk.removeASCuePoint(cuePt)) != null) {
trace("Removed cue point: " + rtn_cuePt.name);
}
FLVPlayback.addASCuePoint(), FLVPlayback.findCuePoint(), FLVPlayback.findNearestCuePoint(), FLVPlayback.findNextCuePointWithName()
|
|
|
|