User Guide

Lingo Dictionary 203
duplicate
Syntax
vectorReference.duplicate()
transformReference.duplicate()
Description
3D vector and transform method; returns a copy of the vector or transform.
Example
This statement creates a copy of the position of model 1 and stores it in the variable zz.
zz = member("MyRoom").model[1].transform.position.duplicate()
See also
clone
duplicateFrame
Syntax
duplicateFrame
Description
Command; 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 command can be used
during Score generation only.
The
duplicateFrame command performs the same function as the insertFrame command.
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.
on animBall numberOfFrames
beginRecording
sprite(20).member = member("Ball", "Toys")
repeat with i = 0 to numberOfFrames
duplicateFrame
end repeat
endRecording
end
duplicate() (list function)
Syntax
(oldList).duplicate()
duplicate(oldList)
Description
List function; returns a copy of a list and copies nested lists (list items that also are lists) and their
contents. The function is useful for saving a lists current content.
When you assign a list to a variable, the variable contains a reference to the list, not the list itself.
This means any changes to the copy also affect the original list.