Skip to main content
Inspiring
August 16, 2007
Question

AS 3: event handeling

  • August 16, 2007
  • 5 replies
  • 501 views
I thought sending a var directly to the event handeler would work but i was wrong. How can you adjust/conditional a function so that when one button is clicked it does one thing and the other another?
This topic has been closed for replies.

5 replies

_Vee_Author
Inspiring
August 16, 2007
good stuff . thanx
Inspiring
August 16, 2007
trace(event.target.parent);
_Vee_Author
Inspiring
August 16, 2007
Thanx for your help.
how do you check its parent?
Inspiring
August 16, 2007
Check out all the stuff that is in the MouseEvent. There is a target property that tells what was clicked on. So:

trace(event.target);
Inspiring
August 16, 2007
use event.target.name inside the event handler to see the name of the movie clip generating the event