Example
In the following script, the
the conditional script is executed when the mouse is released and the object is dropped:
on (press) {
startDrag(this);
}
on (release) {
trace("X:"+this._x);
trace("Y:"+this._y);
stopDrag();
}
See also
onClipEvent handler
onClipEvent handler
onClipEvent(movieEvent:Object) { // your statements here }
Triggers actions defined for a specific instance of a movie clip.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
movieEvent:Object
the statements following it within curly braces ({}) are executed. Any of the following values
can be specified for the
The action is initiated as soon as the movie clip is instantiated and appears in the
■
load
Timeline.
The action is initiated in the first frame after the movie clip is removed from the
■
unload
Timeline. The actions associated with the
any actions are attached to the affected frame.
The action is triggered continually at the frame rate of the movie clip. The
■
enterFrame
actions associated with the
that are attached to the affected frames.
The action is initiated every time the mouse is moved. Use the
■
mouseMove
properties to determine the current mouse position.
_ymouse
Note: This event is supported in Flash Lite only if
.
true
function executes when the mouse is pressed, and
startDrag()
,
Key
- The
is a trigger called an event . When the event occurs,
movieEvent
parameter:
movieEvent
enterFrame
movie clip event are processed before
Unload
clip event are processed before any frame actions
System.capabilities.hasMouse
and
_xmouse
is
Global Functions
71
Need help?
Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers