3、events.TimerEvent; import flash.utils.Timer; import flash.text.TextField; public class dispatch extends Sprite { var dispatcher:time_dispatcher = nee_dispatcher(); var time_count:Timer=neer(1000); var interval_timer:TextField = neer.x=5; interval
4、_timer.y=5; addChild(interval_timer); time_count.addEventListener(TimerEvent.TIMER,shoe); dispatcher.addEventListener(time_dispatcher.ON_DIV_BY_FIVE, on_event_triggered); time_count.start(); } private function on_event_triggered(event:Eve
6、Event;class time_dispatcher extends EventDispatcher { public static var ON_DIV_BY_FIVE:String="can be divided"; public function check_division(num):void { if (num%5==0) { dispatchEvent(nee_dispatcher.ON_DIV_BY_FIVE)); } }} Line8:Creatinganee_disp