300
Chapter 12: Methods
Parameters
intPosn
Optional. An integer that specifies the Cast window for the duplicate cast member. If
omitted, the duplicate cast member is placed in the first open Cast window position.
Example
This statement makes a copy of cast member Desk and places it in the first empty Cast
window position:
-- Lingo syntax
member("Desk").duplicate()
// JavaScript syntax
member("Desk").duplicate();
This statement makes a copy of cast member Desk and places it in the Cast window at
position 125:
-- Lingo syntax
member("Desk").duplicate(125)
// JavaScript syntax
member("Desk").duplicate(125);
See also
Member
duplicateFrame()
Usage
-- Lingo syntax
_movie.duplicateFrame()
// JavaScript syntax
_movie.duplicateFrame();
Description
Movie method; duplicates the current frame and its content, inserts the duplicate frame after the
current frame, and then makes the duplicate frame the current frame. This method can be used
during Score generation only.
This method performs the same function as the
insertFrame()
method.
Parameters
None.
Example
When used in the following handler, the
duplicateFrame
command creates a series of frames
that have cast member Ball in the external cast Toys assigned to sprite channel 20. The number of
frames is determined by the argument
numberOfFrames
.
-- Lingo syntax
on animBall(numberOfFrames)
_movie.beginRecording()
sprite(20).member = member("Ball", "Toys")
repeat with i = 0 to numberOfFrames
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
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...