i believe Array.slice() will do what you need.
var a = [1,2,3];
trace("a: "+a);
b = a.slice();
trace("b: "+b);
b[0] = "Zero";
trace("a:after: "+a);
trace("b:after: "+b);
On 3/2/06, Wade Arnold <[EMAIL PROTECTED]> wrote:
>
> Is it possible to clone and array in AS 2.0? I have copied the array but
> that just places a pointer at the existing array. I am looking to
> clone/duplicate the array to separate the two data elements without having
> to do a for loop. This of course stops working once you use objects or
> multi-dimensional arrays.
>
>
> Thanks!
>
>
> Wade
>
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com