EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 299

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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.

Related product manuals