开发者

flash action script 2: how can i create custom events?

开发者 https://www.devze.com 2023-01-06 18:26 出处:网络
I would like to create my own events. In action script 3 I can just extend the event class and create my own Event Class.

I would like to create my own events. In action script 3 I can just extend the event class and create my own Event Class. how开发者_如何学Go can I achieve the same results using action script 2?

thanks.


You can use mx.events.EventDispatcher:

http://www.actionscript.org/resources/articles/204/1/Using-EventDispatcher/Page1.html

Here's a SO question with a good answer on how to do AS3 style events in AS2:

Best practice for ActionScript 2 events - is there a way to simulate ActionScript 3-style events?

0

精彩评论

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