Hi all,
Except of the issue noted by vinayak.kadam, a general code to achieve this would be for example:
Best!PHP Code:for (i=1;i<=30;i++){
//Assume all buttons are in the _root (main stage) otherwise you have to provide
// the correct target path eg. _root.Container["button"+i] (if they are inside a "Container" clip for example)
var myButton=_root["button"+i]
myButton.onRelease=function(){
trace(this)
this.gotoAndStop("selected");
// Your rest actions here..
}
}
Kostas




Reply With Quote