User Guide
Chapter 3204
To see an example of duplicate() (list function) used in a completed movie, see the Vector
Shapes movie in the Learning/Lingo Examples folder inside the Director application folder.
Example
This statement makes a copy of the list CustomersToday and assigns it to the variable
CustomerRecord:
CustomerRecord = CustomersToday.duplicate()
duplicate() (image function)
Syntax
imageObject.duplicate()
Description
This function creates and returns a copy of the given imageObject. The new image is completely
independent of the original, and isnât linked to any cast member.
If you plan to make a lot of changes to an image, itâs better to make a copy thatâs independent of a
cast member.
Example
This statement creates a new image object from the image of cast member Lunar Surface and
places the new image object into the variable
workingImage:
workingImage = member("Lunar Surface").image.duplicate()
See also
duplicate member
duplicate member
Syntax
member(originalMember).duplicate()
member(originalMember).duplicate({new})
duplicate member original {, new}
Description
Command; makes a copy of the cast member specified by original. The optional new parameter
specifies a specific Cast window location for the duplicate cast member. If the
new parameter isnât
included, the duplicate cast member is placed in the first open Cast window position.
This command is best used during authoring rather than run time because it creates another cast
member in memory, which could result in memory problems. Use the command during
authoring if you want the changes to the cast to be permanently saved with the file.
Examples
This statement makes a copy of cast member Desk and places it in the first empty Cast window
position:
member("Desk").duplicate()
This statement makes a copy of cast member Desk and places it in the Cast window at
position 125:
member("Desk").duplicate(125)