MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 585

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

Advertisement

The following example uses
event is usually used in conjunction with one or more methods and properties of the Key object.
The following script uses
pressed key matches the
key matches the
onClipEvent(keyDown) {
if (Key.getCode() == Key.RIGHT) {
_parent.nextFrame();
} else if (Key.getCode() == Key.LEFT){
_parent.prevFrame();
}
}
The following example uses
_
properties track the position of the mouse each time the mouse moves.
ymouse
onClipEvent(mouseMove) {
stageX=_root._xmouse;
stageY=_root._ymouse;
}
See also
Key
class,
MovieClip._xmouse
onUpdate
Availability
Flash Player 6.
Usage
function onUpdate() {
...statements...;
}
Parameters
None.
Returns
Nothing.
Description
Event handler;
onUpdate
instance of a component on the Stage has a Live Preview movie, the authoring tool invokes the
Live Preview movie's
instance change. The
and its return value is ignored. The
of the Live Preview movie.
Defining an
onUpdate
For more information on Live Preview movies, see Using Components.
onClipEvent()
Key.getCode()
property, the movie is sent to the next frame; if the pressed
Key.RIGHT
property, the movie is sent to the previous frame.
Key.LEFT
onClipEvent()
,
MovieClip._ymouse
is defined for a Live Preview movie used with a component. When an
function whenever the component parameters of the component
onUpdate
function is invoked by the authoring tool with no parameters,
onUpdate
onUpdate
function in a Live Preview movie is optional.
with the
movie event. The
keyDown
to find out which key the user has pressed; if the
with the
mouseMove
,
,
on()
updateAfterEvent()
function should be declared on the main Timeline
keyDown
movie event. The _
xmouse
onUpdate
movie
and
585

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

Subscribe to Our Youtube Channel

Table of Contents