开发者

Is it preferred to make a function declaration after the function call in as3?

开发者 https://www.devze.com 2023-04-10 11:33 出处:网络
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开

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");

}
0

精彩评论

暂无评论...
验证码 换一张
取 消