ByRef versus ByValue
This wasn't a problem till it was affecting ME!
I want to either copy an Array of MovieClips (Deep Copy) so that the 2 Arrays don't reference each other, or make a copy of an individual Array Element into a seperate object (once again a MovieClip) without it referencing the source Array.
for instance:
var myDef:Class;
var myMC:MovieClip;
var myMC2:MovieClip;
var myArray = new Array();
myDef = Class(getDefinitionByName("mc");
myMC = new myDef();
myMC.x=10;
myMC.y=10;
myMC.name = "Test";
myArray[0]=myMC;
stage.addChild(myArray[0]);
myMC2=myArray[0];
myMC2.x=100;
myMC2.y=100;
The MovieClip that's on the stage (myArray[0]), can be controlled by myMC2, but I want it to be a copy so they don't control one another.
How do I break the Reference and copy byValue instead?