James Rods
02-16-2006, 05:19 PM
Hello there,
I've got a little problem that's jamming my brain and I can't really picture what's wrong. I created a dynamic menu using a simple array, attaching all the buttons to the stage. Which button, of course, will execute a different action, and there's where the problem is. The code below was suppose to sort the whole thing out but when I click on the button nothing happens.
_root.mainMenu_0.onRelease = function(){
trace("button 1 worked");
}
_root.mainMenu_1.onRelease = function(){
trace("button 2 worked");
}
etc...
Does anyone know what's wrong? I've debugged the code and the duplicated objects (mainMenu_0, mainMenu_0, etc) are there.
Well, I'll keep frying my brain over here.
Cheers guys,
James.
I've got a little problem that's jamming my brain and I can't really picture what's wrong. I created a dynamic menu using a simple array, attaching all the buttons to the stage. Which button, of course, will execute a different action, and there's where the problem is. The code below was suppose to sort the whole thing out but when I click on the button nothing happens.
_root.mainMenu_0.onRelease = function(){
trace("button 1 worked");
}
_root.mainMenu_1.onRelease = function(){
trace("button 2 worked");
}
etc...
Does anyone know what's wrong? I've debugged the code and the duplicated objects (mainMenu_0, mainMenu_0, etc) are there.
Well, I'll keep frying my brain over here.
Cheers guys,
James.