flex eventBus
package com.wks.util ?public class EventBus extends EventDispatcher ?{ ??public function EventBus() ??{ ??} ??private static var manager:EventBus; ?? ??public static const CHANGEVIEW:String = "changeViewStackIndex"; ?? ??public static function getInstance():EventBus ??{ ???if(!manager)manager = new EventBus; ???return manager; ??} ??public function dispatch(type:String):Boolean ??{ ???return dispatchEvent(new Event(type)); ??} ?} } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |