MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 584

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

onClipEvent()
Availability
Flash Player 5.
Usage
onClipEvent(movieEvent){
// your statements here
}
Parameters
A
is a trigger called an event. When the event takes place, the statements following it
movieEvent
within curly braces are executed. Any of the following values can be specified for the
parameter:
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
actions are attached to the affected frame.
enterFrame
actions associated with the
are attached to the affected frames.
mouseMove
properties to determine the current mouse position.
_ymouse
mouseDown
The action is initiated when the left mouse button is released.
mouseUp
The action is initiated when a key is pressed. Use
keyDown
information about the last key pressed.
The action is initiated when a key is released. Use the
keyUp
retrieve information about the last key pressed.
The action is initiated when data is received in a
data
action. When specified with a
when the last variable is loaded. When specified with a
occurs repeatedly, as each section of data is retrieved.
Description
Event handler; triggers actions defined for a specific instance of a movie clip.
Example
The following statement includes the script from an external file when the SWF file is exported;
the actions in the included script are run when the movie clip they are attached to loads:
onClipEvent(load) {
#include "myScript.as"
}
584
Chapter 12: ActionScript Dictionary
The action is triggered continually at the frame rate of the movie clip. The
enterFrame
The action is initiated every time the mouse is moved. Use the
The action is initiated when the left mouse button is pressed.
loadVariables()
movie clip event are processed before any
Unload
clip event are processed before any frame actions that
Key.getCode()
loadVariables()
action, the
data
loadMovie()
movieEvent
_xmouse
to retrieve
method to
Key.getCode()
or
loadMovie()
event occurs only once,
action, the
data
and
event

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Questions and answers

Table of Contents