I have been trying for an hour to clone an array, It seems that nobody has a true reference on how to do it.
Two arrays - movieClipArray 1 and movieClipArray2
I want to duplicate movieClipArray1 entirely so that when I addChild(movieClipArray2[0]), it doesn’t take away from movieClipArray1 or reference it in any way.
I have tried the
movieClipArray2 = movieClipArray1.concat()
method as well as
public function cloness(source:Object):*
{
var myBA:ByteArray = new ByteArray();
myBA.writeObject(source);
myBA.position = 0;
return(myBA.readObject());
}
But using the concat method, it still references it for some reason, and using the other code I posted, I get back an object rather the exact duplicate of the array itself.
This is hurting my head
ty for any help:rd: