# Load dynamically movieClips after click as3

**URL:** <https://forum.kirupa.com/t/load-dynamically-movieclips-after-click-as3/330522>\
**Category:** Uncategorized\
**Created:** [February 3, 2013, 5:19pm UTC](https://forum.kirupa.com/t/load-dynamically-movieclips-after-click-as3/330522 "2013-02-03T17:19:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GLotfi](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@GLotfi](https://forum.kirupa.com/u/GLotfi)\
**Post date:** [February 3, 2013, 5:19pm UTC](https://forum.kirupa.com/t/load-dynamically-movieclips-after-click-as3/330522/1 "2013-02-03T17:19:45Z")

</div>

[COLOR=#000000][FONT=Arial]Please I am in hurry.[/FONT][/COLOR]  
[COLOR=#000000][FONT=Arial]I have on scene five buttons and a movieClip. Iwant to load dynamically movieClips from the library in the movieClip after click on button (each button calls a movieClip).[/FONT][/COLOR]  
[COLOR=#000000][FONT=Arial]the movieclip name is « **container** » and those are in library (01, 02 ,05)[/FONT][/COLOR]  
[COLOR=#000000][FONT=Arial]I wrote these lines but doesn’t work.[/FONT][/COLOR]

btn\_01.addEventListener([COLOR=#2B91AF]MouseEvent[/COLOR].CLICK, show\_detail);btn\_02.addEventListener([COLOR=#2B91AF]MouseEvent[/COLOR].CLICK, show\_detail);btn\_03.addEventListener([COLOR=#2B91AF]MouseEvent[/COLOR].CLICK, show\_detail);btn\_04.addEventListener([COLOR=#2B91AF]MouseEvent[/COLOR].CLICK, show\_detail);btn\_05.addEventListener([COLOR=#2B91AF]MouseEvent[/COLOR].CLICK, show\_detail);[COLOR=#00008B]function[/COLOR] show\_detail(e:[COLOR=#2B91AF]MouseEvent[/COLOR]):[COLOR=#00008B]void[/COLOR] { [COLOR=#00008B]var[/COLOR] gate=e.currentTarget.name.substr([COLOR=#800000]4[/COLOR]); container.addChild(gate) ;}[COLOR=#000000][FONT=Arial]What should I do please?[/FONT][/COLOR]
