[osflash] duplication problem
Niels Wolf
niels.wolf at mediacatalyst.com
Wed Jul 30 07:51:41 PDT 2008
You tried copying from memory?
public function cloneObject(source:Object):*{
var copier:ByteArray = new ByteArray();
copier.writeObject(source);
copier.position = 0;
return copier.readObject();
}
On 7/28/08 6:52 PM, "bardo" <mastrobardo at gmail.com> wrote:
> I have experimented with 2 methods mainly , senocular's
> duplicateDisplayObject and this one
>
> var originalItem:Object = obj;//
> var itemClass:Class = originalItem.constructor;
> var itemo:* = new itemClass();
>
>
> but all two seems to works only with sprites or movies i embed from an
> swf compiled in flash(but im a flex user) , but no one seems to works
> with sprites created dynamically.Any suggestion?
> tnx in advice
More information about the osflash
mailing list