Returns
Nothing.
Description
Method; removes an event listener from a component instance.
Example
The following example removes the listener for a
occurs. This causes only the first of three cue points to be detected.
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:
Usage 1: listener object
/**
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/
cuepoints.flv";
var listenerObject:Object = new Object(); // create listener object
listenerObject.cuePoint = function(eventObject:Object):Void {
trace("Hit cue point at " + eventObject.info.time);
my_FLVPlybk.removeEventListener("cuePoint", listenerObject);
};
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
Usage 2: listener function
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
my_ta.visible = false;
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/
cuepoints.flv";
function cuePoint(eventObject:Object):Void {
trace("Hit cue point at " + eventObject.info.time);
my_FLVPlybk.removeEventListener("cuePoint", cuePoint);
};
my_FLVPlybk.addEventListener("cuePoint", cuePoint);
See also
FLVPlayback.addEventListener()
640
FLVPlayback Component (Flash Professional Only)
event when the first cue point
cuePoint
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers