Global Functions
71
Example
In the following script, the
startDrag()
function executes when the mouse is pressed, and
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
,
Key
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
movieEvent
is a trigger called an
event
. When the event occurs,
the statements following it within curly braces ({}) are executed. Any of the following values
can be specified for the
movieEvent
parameter:
■
load
The action is initiated as soon as the movie clip is instantiated and appears in the
Timeline.
■
unload
The action is initiated in the first frame after the movie clip is removed from the
Timeline. The actions associated with the
Unload
movie clip event are processed before
any actions are attached to the affected frame.
■
enterFrame
The action is triggered continually at the frame rate of the movie clip. The
actions associated with the
enterFrame
clip event are processed before any frame actions
that are attached to the affected frames.
■
mouseMove
The action is initiated every time the mouse is moved. Use the
_xmouse
and
_ymouse
properties to determine the current mouse position.
Note:
This event is supported in Flash Lite only if
System.capabilities.hasMouse
is
true
.
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...