# Dynamic MovieClip Names

**URL:** <https://forum.kirupa.com/t/dynamic-movieclip-names/249032>\
**Category:** flash\
**Created:** [January 14, 2008, 8:18pm UTC](https://forum.kirupa.com/t/dynamic-movieclip-names/249032 "2008-01-14T20:18:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xohol](https://avatars.discourse-cdn.com/v4/letter/x/59ef9b/32.png) [@xohol](https://forum.kirupa.com/u/xohol)\
**Post date:** [January 14, 2008, 8:18pm UTC](https://forum.kirupa.com/t/dynamic-movieclip-names/249032/1 "2008-01-14T20:18:43Z")

</div>

Ok, im just making the switch over to AS3.

ive tried to search, but can’t find the results (im not even sure what this is called)

how do i convert the following into AS3? Specifically the main[“b” + i]. My buttons are called b1, b2, b3 etc, and i could loop an action to them in AS2 by using the following loop. Doesn’t seem to work now.  
thanks!

[AS]  
var main:MovieClip = this  
var i:int;  
for (i=1; i\<=8; i++)  
{  
main[“b” + i].addEventListener (MouseEvent.MOUSE\_DOWN, bRelease);  
}  
[/AS]
