Mar
25
2009
25
2009
Event handler function – did you know that?
I have notisted that not many of you know about that. You can call an Event handler function normaly without the dispatchEvent. For example you have the button Click handler function:
private function buttonClick(e:MouseEvent):void { trace("button click"); } /*If you write a function like this and you will call the buttonClick(); you will get an error that you havent provide the the Event.*/ private function buttonClick(e:MouseEvent = null):void { trace("button click"); } /* if you try somethink like this, you can call the buttonClick() function whenever you like and you want get any errors!*/
Tags: ActionScript 3.0, Flash

An article by








