I use this function (think I got it from Darron Schall's blog) to do a deep
copy. I had the same experience as Jesse with mx.utils.ObjectCopy not
working correctly...
// --
// copy an object
function copyObject(obj) {
// create a "new" object or arr
Hi,
>
> How do you duplicate an object {bool:true, val:5} in another variable
> without pointing to the original one, and without having to create a
> constructor. In Director, there's a duplicate() method in Lingo. Is
> there an equivalent way to do this in Flash?
>
> Something like this, but
- Original Message -
> From: "Mendelsohn, Michael" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list"
> Sent: Monday, January 09, 2006 12:05 PM
> Subject: [Flashcoders] Duplicating an object without pointing to original
> one
>
>
> Hi list...
= new MyObject();
o.label = label;
o.data = data;
return o;
}
}
- Original Message -
From: "Mendelsohn, Michael" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list"
Sent: Monday, January 09, 2006 12:05 PM
Subject: [Flashcoders] Duplicating an
Hi list...
How do you duplicate an object {bool:true, val:5} in another variable
without pointing to the original one, and without having to create a
constructor. In Director, there's a duplicate() method in Lingo. Is
there an equivalent way to do this in Flash?
Something like this, but which w
5 matches
Mail list logo