503
on prepareMovie
Syntax
on prepareMovie
statement(s)
end
Description
System message and event handler; contains statements that run after the movie preloads cast
members but before the movie does the following:
•
Creates instances of behaviors attached to sprites in the first frame that plays.
•
Prepares the first frame that plays, including drawing the frame, playing any sounds, and
executing transitions and palette effects.
New global variables used for sprite behaviors in the first frame should be initialized in the
on
prepareMovie
handler. Global variables already set by the previous movie do not need to be reset.
An
on prepareMovie
handler is a good place to put Lingo that creates global variables, initializes
variables, plays a sound while the rest of the movie is loading into memory, or checks and adjusts
computer conditions such as color depth.
The
go
,
play
, and
updateStage
commands are disabled in an
on prepareMovie
handler.
Example
This handler creates a global variable when the movie starts:
on prepareMovie
global currentScore
set currentScore = 0
end
See also
on enterFrame
,
on startMovie
preRotate
Syntax
transformReference
.preRotate(
xAngle
,
yAngle
,
zAngle
)
transformReference
.preRotate(
vector
)
transformReference
.preRotate(
positionVector
,
directionVector
, \
angle
)
member(
whichCastmember
).
node
.transform.preRotate( xAngle, \
yAngle, zAngle )
member(
whichCastmember
).
node
.transform.preRotate(
vector
)
member(
whichCastmember
).
node
.transform.preRotate\
(
positionVector
,
directionVector
,
angle
)
Description
3D transform command; applies a rotation before the current positional, rotational, and scale
offsets held by the referenced transform object. The rotation may be specified as a set of three
angles, each of which specify an angle of rotation about the three corresponding axes. These
angles may be specified explicitly in the form of
xAngle
,
yAngle
, and
zAngle
, or by a vector,
where the x component of the vector corresponds to the rotation about the x-axis, the y about the
y-axis, and the z about the z-axis.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...