Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > Media components > Media.cuePoint | |||
MediaDisplay, MediaPlayback.
Flash Player 7.
Flash MX Professional 2004.
var listenerObject:Object= new Object();listenerObject.cuePoint = function(eventObj:Object) {// ...};myMedia.addEventListener("cuePoint",listenerObject);
Event; notification that the playhead has reached the cue point. The Media.cuePoint event object has the following properties:
cuePointName A string that indicates the name of the cue point.
cuePointTime A number, expressed in frames or seconds, that indicates when the cue point was reached.
target A reference to the MediaPlayback object if there is one, or to the MediaDisplay object itself.
type The string "cuePoint".
The following example uses an object listener to determine when a cue point has been reached:
var myCuePointListener:Object = new Object();myCuePointListener.cuePoint = function(eventObject:Object){trace("heard " + eventObject.type + ", " + eventObject.target + ", " + eventObject.cuePointName + ", " + eventObject.cuePointTime);};myPlayback.addEventListener("cuePoint", myCuePointListener);
Media.addCuePoint(), Media.cuePoints, Media.getCuePoint()
Flash CS3