I currently have this code on my button layer for all my four buttons
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 -
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?