User Guide
Table Of Contents
- Contents
- Flash Lite Global Functions
- call()
- chr()
- duplicateMovieClip()
- eval ()
- getProperty()
- getTimer()
- getURL()
- gotoAndPlay()
- gotoAndStop()
- ifFrameLoaded()
- int()
- length()
- loadMovie()
- loadMovieNum()
- loadVariables()
- loadVariablesNum()
- mbchr()
- mblength()
- mbord()
- mbsubstring()
- nextFrame()
- nextScene()
- Number()
- on()
- ord()
- play()
- prevFrame()
- prevScene()
- random()
- removeMovieClip()
- set()
- setProperty()
- stop()
- stopAllSounds()
- String()
- substring()
- tellTarget()
- toggleHighQuality()
- trace()
- unloadMovie()
- unloadMovieNum()
- Flash Lite Properties
- Flash Lite Statements
- Flash Lite Operators
- add (string concatenation)
- += (addition assignment)
- and
- = (assignment)
- /* (block comment)
- , (comma)
- // (comment)
- ?: (conditional)
- -- (decrement)
- / (divide)
- /= (division assignment)
- . (dot)
- ++ (increment)
- && (logical AND)
- ! (logical NOT)
- || (logical OR)
- % (modulo)
- %= (modulo assignment)
- *= (multiplication assignment)
- * (multiply)
- + (numeric add)
- == (numeric equality)
- > (numeric greater than)
- >= (numeric greater than or equal to)
- <> (numeric inequality)
- < (numeric less than)
- <= (numeric less than or equal to)
- () (parentheses)
- " " (string delimiter)
- eq (string equality)
- gt (string greater than)
- ge (string greater than or equal to)
- ne (string inequality)
- lt (string less than)
- le (string less than or equal to)
- - (subtract)
- -= (subtraction assignment)
- Flash Lite Specific Language Elements
- Capabilities
- fscommand()
- fscommand2()
- Escape
- FullScreen
- GetBatteryLevel
- GetDateDay
- GetDateMonth
- GetDateWeekday
- GetDateYear
- GetDevice
- GetDeviceID
- GetFreePlayerMemory
- GetLanguage
- GetLocaleLongDate
- GetLocaleShortDate
- GetLocaleTime
- GetMaxBatteryLevel
- GetMaxSignalLevel
- GetMaxVolumeLevel
- GetNetworkConnectStatus
- GetNetworkName
- GetNetworkRequestStatus
- GetNetworkStatus
- GetPlatform
- GetPowerSource
- GetSignalLevel
- GetTimeHours
- GetTimeMinutes
- GetTimeSeconds
- GetTimeZoneOffset
- GetTotalPlayerMemory
- GetVolumeLevel
- Quit
- ResetSoftKeys
- SetInputTextType
- SetQuality
- SetSoftKeys
- StartVibrate
- StopVibrate
- Unescape

duplicateMovieClip() 13
Operands
target The target path of the movie clip to duplicate.
newname A unique identifier for the duplicated movie clip.
depth A unique depth level for the duplicated movie clip. The depth level indicates a
stacking order for duplicated movie clips. This stacking order is much like the stacking order
of layers in the timeline; movie clips with a lower depth level are hidden under clips that have
a higher depth level. You must assign to each duplicated movie clip a unique depth level so
that it does not overwrite existing movie clips on occupied depth levels.
Description
Function; creates an instance of a movie clip while the SWF file plays and returns a reference
to the duplicated movie clip. The playhead in a duplicate movie clip always starts at Frame 1,
regardless of where the playhead is in the original (parent) movie clip. Variables in the parent
movie clip are not copied into the duplicate movie clip. If the parent movie clip is deleted, the
duplicate movie clip is also deleted. Use the
removeMovieClip() function or method to
delete a movie clip instance created with
duplicateMovieClip().
Example
The following example duplicates a movie clip named originalClip to create a new clip
named
newClip, at a depth level of 10. The new clip’s x position is set to 100 pixels.
duplicateMovieClip("originalClip", "newClip", 10);
setProperty("newClip", _x, 100);
The following example uses duplicateMovieClip() in a for loop to create several new
movie clips at once. An index variable keeps track of the highest occupied stacking depth.
Each duplicate movie clip’s name contains a numeric suffix that corresponds to its stacking
depth (
clip1, clip2, clip3).
for (i = 1; i <= 3; i++) {
newName = "clip" add i;
duplicateMovieClip("originalClip", newName); }
See also
removeMovieClip()