| Method | Defined by | ||
|---|---|---|---|
|
clone(source:Object):*
[static]
Creates a duplicate of the source object by storing it in a ByteArray and reading it back in,
The object will return untyped so you may need to cast it to the desired class.
| Cloner | ||
| clone | () | method |
public static function clone(source:Object):*Creates a duplicate of the source object by storing it in a ByteArray and reading it back in, The object will return untyped so you may need to cast it to the desired class. To ensure your object retains its type, you should register the class using flash.net.registerClassAlias() before cloning. AMF rules apply. Check out the documentation for more info.
Parameterssource:Object — - the object to duplicate.
|
* — - the duplicate of the source object.
|
See also
registerClassAlias("com.example.Example", Example);
var example:Example = new Example();
var clone:Example = Cloner.clone(example) as Example;