Lingo Dictionary > A-C > on cuePassed |  |

on cuePassed

Syntax

    on cuePassed(channelID, cuePointNumber,cuePointName)
    	statement(s)
    end

    on cuePassed(me,channelID, cuePointNumber,cuePointName)
    	statement(s)
    end

Description

System message and event handler; contains statements that run each time a sound or sprite passes a cue point in its media.

| `me`—The optional `me` parameter is the `scriptInstanceRef` value of the script being invoked. You must include this parameter when using the message in a behavior. If this parameter is omitted, the other arguments will not be processed correctly.
| `channelID—`The number of the sound or sprite channel for the file where the cue point occurred.
| `cuePointNumber`—The ordinal number of the cue point that triggers the event in the list of the cast member's cue points.
| `cuePointName—`The name of the cue point that was encountered.

The message is passed—in order—to sprite, cast member, frame, and movie scripts. For the sprite to receive the event, it must be the source of the sound, like a QuickTime movie or SWA cast member. Use the `isPastCuePoint` property to check cues in behaviors on sprites that don't generate sounds.

Example

This handler placed in a Movie or Frame script reports any cue points in sound channel 1 to the Message window:

    on cuePassed channel, number, name
    	if (channel = #Sound1) then
    		put "CuePoint" && number && "named" && name && "occurred in sound 1"
    	end if
    end

See also

`cuePointNames`, `cuePointTimes`, `isPastCuePoint(), mostRecentCuePoint`