- 主调:
- instance.nc.sendReSort(array);
- conneticon:
- public function sendReSort(arr:Array):void{
- nc.call("reSort",null,Id,arr);
- }
- return:
- public function reSort(id:int,arr:Array):void{
- this.dispatchEvent(new GameEvent(GameEvent.GAMEMSG,id,arr))
- }
- 主监听:
- instance.nc.addEventListener(GameEvent.GAMEMSG,emenySort);
- 事件:
- package event
- {
- import flash.events.Event;
- public class GameEvent extends Event
- {
- public var array:Array;
- public var id:int;
- public static var GAMEMSG:String="gamemsg";
- public function GameEvent(type:String,id:int,array:Array):void
- {
- this.array=array;
- this.id = id;
- super(type);
- }
- }
- }
收发回调一套罗
最新推荐文章于 2024-07-20 15:30:30 发布