# \[as3\] For loop + getchildbyname

**URL:** <https://forum.kirupa.com/t/as3-for-loop-getchildbyname/322428>\
**Category:** flash\
**Created:** [May 20, 2011, 1:38pm UTC](https://forum.kirupa.com/t/as3-for-loop-getchildbyname/322428 "2011-05-20T13:38:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvrb](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mvrb](https://forum.kirupa.com/u/mvrb)\
**Post date:** [May 20, 2011, 1:38pm UTC](https://forum.kirupa.com/t/as3-for-loop-getchildbyname/322428/1 "2011-05-20T13:38:52Z")

</div>

Hello everyone, I have a little problem in my game. I have made 30 movieclips for my level selection screen. Then I create a movieclip with the same name using a for loop. With that code I make roll\_over function showing a Tooltip.  
I then want to trace what button is being clicked. My whole code is here:  
[http://pastebin.com/mWXkmgZt](http://pastebin.com/mWXkmgZt)  
I want to trace what button is clicked, so I can show it on my tooltip textbox.

Can anyone please help me with this.

Regards,  
Mvrb

_EDIT_ it is fixed now
