03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

on (press) {<br />

startDrag(this);<br />

}<br />

on (release) {<br />

trace("X:"+this._x);<br />

trace("Y:"+this._y);<br />

stopDrag();<br />

}<br />

See also<br />

onClipEvent h<strong>and</strong>ler, Key<br />

onClipEvent h<strong>and</strong>ler<br />

onClipEvent(movieEvent:Object) {<br />

// your statements here<br />

}<br />

Triggers actions defined for a specific instance of a movie clip.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 5<br />

Parameters<br />

movieEvent:Object - The movieEvent is a trigger called an event . When the event occurs,<br />

the statements following it within curly braces ({}) are executed. Any of the following values<br />

can be specified for the movieEvent parameter:<br />

■ load The action is initiated as soon as the movie clip is instantiated <strong>and</strong> appears in the<br />

Timeline.<br />

■ unload The action is initiated in the first frame after the movie clip is removed from the<br />

Timeline. The actions associated with the Unload movie clip event are processed before<br />

any actions are attached to the affected frame.<br />

■ enterFrame The action is triggered continually at the frame rate of the movie clip. The<br />

actions associated with the enterFrame clip event are processed before any frame actions<br />

that are attached to the affected frames.<br />

■ mouseMove The action is initiated every time the mouse is moved. Use the _xmouse <strong>and</strong><br />

_ymouse properties to determine the current mouse position.<br />

■ mouseDown The action is initiated when the left mouse button is pressed.<br />

■ mouseUpThe action is initiated when the left mouse button is released.<br />

■ keyDown The action is initiated when a key is pressed. Use Key.getCode() to retrieve<br />

information about the last key pressed.<br />

Global Functions 87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!