开发者

how to call function on movie load in actionscript instead using event listener?

Here is the code to call function using event listener:

 var listListener:Object = new Object();
 listListener.change = function() { changeImage(); }
 thelist.addEventListener("change", listListen开发者_如何学Pythoner);

Is there a way to call the function simply when the frame is loaded using the same function as above?

Thanks agus


So long as you're calling this from within an instance of a Class that extends EventDispatcher (i.e. MovieClip, Sprite, etc.)...

Use this to dispatch an event of that type (i.e. "change").

dispatchEvent(new Event("change"));
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜