302
Chapter 12: Methods
Example
When used in the following handler, the
endRecording
keyword ends the Score
generation session:
-- 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")
sprite(20).locH = horizontal
sprite(20).locV = vertical
sprite(20).foreColor = 255
horizontal = hori 3
vertical = ve 2
_movie.updateFrame()
end repeat
_movie.endRecording()
end animBall
// JavaScript syntax
function animBall(numberOfFrames) {
_movie.beginRecording();
var horizontal = 0;
var vertical = 100;
for (var i = 1; i <= numberOfFrames; i++) {
_movie.go(1);
sprite(20).member = member("Ball");
sprite(20).locH = horizontal;
sprite(20).locV = vertical;
sprite(20).foreColor = 255;
horizontal = hori 3;
vertical = ve 2;
_movie.updateFrame();
}
_movie.endRecording();
}
See also
beginRecording()
,
Movie
,
updateFrame()
erase()
Usage
-- Lingo syntax
memberObjRef
.erase()
// JavaScript syntax
memberObjRef
.erase();
Description
Member method; deletes a specified cast member and leaves its slot in the Cast window empty.
For best results, use this method during authoring and not in projectors. Using this method in
projectors may cause memory problems.
Summary of Contents for DIRECTOR MX 2004
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...