i have to make an addchild to a movieclip, but i really don't know how to make it with a dynamic name.
for example
private function buttonClicked(nameOfTheButt:String):void
{
thumbs.addChild(nameOfTheButt);
}
buttonClicked("homepage");
obviously there's a casting error, im tryin to make an addchild to a string... how can i solve this problem with a fast and possibily clean way?
this is the real example, based on some answers i get:
thumbs_homepage = new MovieClip();
thumbs_casehistory = new MovieClip();
thumbs_contacts = new MovieClip();
public function showThumbs(thumbsToShow:String):void
{
//dynamic addchild
}
showThumbs("thumbs_homepage"); //or "thumbs_contacts" or "thumbs_casehistory"