EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 574

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...
574 Chapter 12: Methods
update
Usage
-- Lingo syntax
member(whichCastmember).model(whichModel).update
// JavaScript syntax
member(whichCastMember).model(whichModel).update();
Description
3D command; causes animations on the model to update without rendering. Use this command
to find the exact position of an animating model in Lingo.
Parameters
None.
updateFrame()
Usage
-- Lingo syntax
_movie.updateFrame()
// JavaScript syntax
_movie.updateFrame();
Description
Movie method; during Score generation only, enters the changes to the current frame that have
been made during Score recording and moves to the next frame. Any objects that were already in
the frame when the update session started remain in the frame. You must issue an
updateFrame() method for each frame that you are updating.
Parameters
None.
Example
When used in the following handler, the updateFrame command enters the changes that have
been made to the current frame and moves to the next frame each time Lingo reaches the end of
the repeat loop. The number of frames is determined by the argument
numberOfFrames.
-- Lingo syntax
on animBall(numberOfFrames)
_movie.beginRecording()
horizontal = 0
vertical = 100
repeat with i = 1 to numberOfFrames
_movie.go(i)
sprite(20).member = member("Ball").number
sprite(20).locH = horizontal
sprite(20).locV = vertical
sprite(20).foreColor = 255
horizontal = horizontal + 3
vertical = vertical + 2
_movie.updateFrame()
end repeat
_movie.endRecording()
end animBall