I have many buttons on screen. About 25. They are all different shapes. Is there a way to have a listener that can inform me the _name of the button clicked when any of them is clicked? Thanks ahead for any help.
Printable View
I have many buttons on screen. About 25. They are all different shapes. Is there a way to have a listener that can inform me the _name of the button clicked when any of them is clicked? Thanks ahead for any help.
you can do this in actionscript with variable passing. each button thas tis clicked passes itself into a function that gets the button name(providing you give it an instance name) and does whatever you want to do with it.
Code:myButton_btn.onRelease = function(){
getName(this);
}
function getName(button){
trace(eval(button)._name);
}
Thanks Knight, I´ll try that, sounds like a great solution!