# Movie clip onRelase simple bug \[Help\]

**URL:** https://forum.kirupa.com/t/movie-clip-onrelase-simple-bug-help/54725
**Category:** Uncategorized
**Created:** [June 17, 2004, 2:14am UTC](https://forum.kirupa.com/t/movie-clip-onrelase-simple-bug-help/54725 "2004-06-17T02:14:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![eze](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@eze](https://forum.kirupa.com/u/eze)
#### Post date: [June 17, 2004, 2:14am UTC](https://forum.kirupa.com/t/movie-clip-onrelase-simple-bug-help/54725/1 "2004-06-17T02:14:10Z")

</div>

I currently have this code on my button layer for all my four buttons

```auto

button_array = ["home","plans","terms","contact"];
for (var i in button_array){
this[button_array*].onRelease = function() {
 
 _root.fromName = [button_array*+"_mc"];
 content_mc.gotoAndPlay(36);
 };
}

```

And for every button it plays the home\_mc clip(i have an attachmoive command in content\_mc to attach \_root.fromName)

But what is strange is that when i edit the above code to -

```auto

button_array = ["home","plans","terms","contact"];
for (var i in button_array){
this[button_array*].onRelease = function() {
 
 _root.fromName = "plans_mc";
 content_mc.gotoAndPlay(36);
 };
}

```

Or another clip name it works… maybe someting wrong with my array?
