duplicate() (Member)
299
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
image()
duplicate() (list function)
Usage
(
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 list’s 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.
To see an example of
duplicate() (list function)
used in a completed movie, see the Vector
Shapes movie in the Learning/Lingo folder inside the Director application folder.
Parameters
oldList
Required. Specifies the list to duplicate.
Example
This statement makes a copy of the list CustomersToday and assigns it to the variable
CustomerRecord
:
CustomerRecord = CustomersToday.duplicate()
See also
image()
duplicate() (Member)
Usage
-- Lingo syntax
memberObjRef
.duplicate({
intPosn
})
// JavaScript syntax
memberObjRef
.duplicate({
intPosn
});
Description
Member method; makes a copy of a specified cast member.
This method is best used during authoring rather than during runtime; it creates another cast
member in memory, which could result in memory problems.
Use this method to permanently save cast member changes with the file.
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...