# Problems with array syntax

**URL:** <https://forum.kirupa.com/t/problems-with-array-syntax/251702>\
**Category:** flash\
**Created:** [February 11, 2008, 10:06pm UTC](https://forum.kirupa.com/t/problems-with-array-syntax/251702 "2008-02-11T22:06:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ubermeowmix](https://avatars.discourse-cdn.com/v4/letter/u/7cd45c/32.png) [@Ubermeowmix](https://forum.kirupa.com/u/Ubermeowmix)\
**Post date:** [February 11, 2008, 10:06pm UTC](https://forum.kirupa.com/t/problems-with-array-syntax/251702/1 "2008-02-11T22:06:27Z")

</div>

I need to assign a movie clip reference using the [] operators

I can do it in one assignation but not two, please help example below:

[COLOR=RoyalBlue]for (var i = 0; i\<current\_array.length; i++) {  
var this\_btn\_name:String = “btn\_”+current\_array\*;  
menu\_open.empty\_mc\*[this\_btn\_name].btn\_index = this\_btn\_name;  
menu\_open.empty\_mc\*["."+this.btn\_index].onRelease = function() {  
// do frame change etc  
}  
}[/COLOR]

the name of the button index references to names 1-4 etc so that it can pass that data on to a switch statement.
