5 Replies Latest reply on May 28, 2010 6:34 AM by kglad

    Add event Listener to any Button instance in Stage


      Is there any way in AS2 to add an event listener NOT to a particular button instance in the stage, but to any symbol in the stage which is a Button??




      al_clicar = new Object();
      al_clicar.click = function() {
           trace("you clicked me!!");
      boton_comp.addEventListener("click", al_clicar);

      But instead of using: boton_comp instance name, using something like Button(class). addEventListener
      So that whenever I press any Button I may have in my Stage it triggers the function

      Thanks in advance