Hi, thanks for taking the time to look at my query:
Essentially I want to know what to replace the **[COLOR=red]1_mc[/COLOR] **with.
var various_mc:MovieClip = new 1_mc;
addChild(various_mc);
trace(various_mc) // [object 1_mc]
**if(various_mc == [COLOR=red]1_mc)[/COLOR]** // This causes the error.
{
removeChild(various_mc);
various_mc = new 2_mc;
addChild(various_mc);
}
The if statement runs on the click of a button. I want it so that if 1_mc is on stage, its removed and 2_mc is placed on the stage. At the moment I am doing this by placing them into a sprite and using it like a loader… but I thought maybe this would be a more efficient method.
Thanks!