Is it preferred to make a function declaration after the function call in as3?
In all the examples I've been going through online for as3, it seems as though the function declaration is always after the function call. Is this preferred to declaring the function before you call开发者_如何学JAVA it?
Ex:
myButton.addEventListener(MouseEvent.CLICK, eventListenerFunc);
function eventListenerFunc (eventargument:Object):void{
trace ("My button was clicked");
}
精彩评论