clone | ||||||||||
Type | command | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | Duplicates an object. | |||||||||
Introduced | 1.0 | |||||||||
OS | mac, windows, linux, ios, android | |||||||||
Platforms | desktop, server | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Values |
| |||||||||
Related | Property: pixels, properties, name Message: newAudioclip, newButton, newCard, newGroup, newPlayer, newGraphic, newField, newScrollbar, newEPS, newImage, newVideoclip Keyword: card, control, it Glossary: object, grouped control, current card, owner, command Function: clipboard Command: create card, paste, group, copy, create stack Object: stack | |||||||||
Description | Use the clone command to create a copy of an existing object. If the object is a control, its copy is placed on the current card, 32 pixels below and to the right of the original object. The copy's name and other properties are the same as those of the original. If the object is a groupedcontrol, the clone is also owned by the group.
If the object is a card, the copy becomes the current card. If the object is a stack, the newly created stack is opened. It is named "Copy of" and the stack's name. The clone command does not affect the contents of the clipboard. If the 'as' variant is used, the newly created object is given the specified name. |