More information about the Underscore mailing list

[_] as3 - adding a mc from library using dynamic name

Richard Davey rich at
Wed Dec 9 14:17:11 GMT 2009

Hi juan,

Wednesday, December 9, 2009, 2:11:00 PM, you wrote:

> just trying to convert some as2 to as3.

> can you tell me how I can get this to work?:

>     var animation_to_attach_name:String = "mc_animation_" + 
> current_animation;
>     var animation:MovieClip = new animation_to_attach_name();
>     animations.addChild(animation);

> How can I instantiate my mc with a dynamically created name?


PHP: - Zend Certified Engineer
AS3: - Flash Game Development

"Never trust a computer you can't throw out of a window"