I have many MovieClips and each has a name like "mcDummyClosed" and then and instance name "slideDummyClosed". Another MovieClip has a link to e.g. slideDummyClosed which I then call DummyClosed. I add a MouseEvent.CLICK event to DummyClosed.
Now without adding slideDummyClosed to the stage nor any other MovieClip can I with a string containing it's name get that instance?
I've tried using getChildByName() but that only seems to work if I've already added the MC to be found and added before. My code looks something like this:
public function lookHere(e:MouseEvent){
//this is the function called by e.g. DummyClosed
currentView.removeChildAt(0); //remove the MC that was here before
var slideName:String = 'slide' + e.target.name; //the name of the instance
currentView.addChild(??); //how do I add slideName (e.g. slideDummyClosed) here?
}