EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 368

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
368 Chapter 12: Methods
Parameters
None.
Example
The following handler generates a frame that has the transition cast member Fog assigned in the
transition channel followed by a set of empty frames. The argument
numberOfFrames sets the
number of frames.
-- Lingo syntax
on animBall(numberOfFrames)
_movie.beginRecording()
_movie.frameTransition = member("Fog").number
_movie.go(_movie.frame + 1)
repeat with i = 0 to numberOfFrames
_movie.insertFrame()
end repeat
_movie.endRecording()
end animBall
// JavaScript syntax
function animBall(numberOfFrames) {
_movie.beginRecording();
_movie.frameTransition = member("Fog").number;
_movie.go(_movie.frame + 1);
for (var i = 0; i <= numberOfFrames; i++) {
_movie.insertFrame();
}
_movie.endRecording();
}
See also
duplicateFrame(), Movie
insertOverlay
Usage
sprite(whichSprite).camera{(index)}.insertOverlay(index, \
texture, locWithinSprite, rotation)
member(whichCastmember).camera(whichCamera).\
insertOverlay(index, texture, \
locWithinSprite, rotation)
Description
3D camera command; adds an overlay to the camera’s list of overlays at a specified position in
the list.
Parameters
index Required. Specifies the index position in the camera’s list of overlays to which the overlay
is added.
texture Required. Specifies the texture of the added overlay.
locWithinSprite Required. A 2D loc at which the overlay is displayed in the 3D sprite. This
location is measured from the upper left corner of the sprite.
rotation Optional. Specifies the rotation of the added overlay.