Duplicate movieclip you dynamically made
Gidday
I have a class that has this above the constructor...
public var mc:MovieClip = new MovieClip();
... and a later fucntion gives it some graphics etc
In another function later on, I want to make duplicates of 'mc' with different names, but am getting the error:
1046: Type was not found or was not a compile-time constant: mc.
var copies:int = 10;
var y:int = 0;
for(var i:int = 0; i < copies; i++)
{
var clone:mc = new mc(); // <<<< error occurs here
clone.name = 'clip' + i
clone.x = 0;
clone.y = y+10;
addChild(clone);
}
Why does var clone not recognise mc?
I guess my question is - how do you make copies of a dynamically created movieclip (as opposed to one linked from the IDE library in Flash Pro)?
Cheers guys