大约有 18 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0028 秒)
...g; public var Color:int; }3、Data的相关代码public class Data extends EventDispatcher { public function Data() { } protected function dataSourceChange(eventType:String, property:String, value:Object):void { var data:* = this[property]; this[property] = value; if (value != data) { var result:Boo...
来源: Laya_社区 发布时间: 20161223
EventDispatcher接收不到参数 var Dispatcher = (function(_super){ function Dispatcher(){ Dispatcher.super(this); }; //注册类 Laya.class(Dispatcher,"Dispatcher",_super); //实例EventDispatcher类 Dispatcher.eventDispatcher = new Laya.EventDispatcher(); //发送事件 Dispatcher.Emit = functi...
来源: Laya_社区 发布时间: 20170809
EventDispatcher.hasListener问题 var e:EventDispatcher = new EventDispatcher(); e.on("test", this, this.test1); e.on("test", this, this.test2); e.off("test", this, this.test1); e.off("test", this, this.test2); console.log(e.hasListener("test")); ---------------------------------------- 输出:true...
来源: Laya_社区 发布时间: 20180423
Laya.EventDispatcher off 删除侦听器 var eventDis = new Laya.EventDispatcher() eventDis.on('TEST_EVENT_DIS', this, someEventHandler, null) eventDis.off('TEST_EVENT_DIS', this, another_eventHandler, false) off 怎样才能 从 EventDispatcher 对象中删除侦听器? ...
来源: Laya_社区 发布时间: 20180914
...function once(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知,此侦听事件响应一次后自动移除。 Parameters type:String — 事件的类型。 ...
来源: Laya_社区 发布时间: 20180304
...c function on(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知。 Parameters type:String — 事件的类型。 caller:* — 事件侦听函数的执行...
来源: Laya_社区 发布时间: 20170308
...mport laya.ani.swf.MovieClip; import laya.events.Event; import laya.events.EventDispatcher; import laya.net.Loader; import laya.utils.Handler; public class BeforLoader extends EventDispatcher { public static const BEFORLOADERFINISH:String = "BeforLoaderFinish"; private const ADDONE:String = "bingan/...
来源: Laya_社区 发布时间: 20161213
...事件,在Sample中对该事件进行监听package { import laya.events.EventDispatcher; public class Mod extends EventDispatcher { public function Mod() { super(); } private static var _instance:Mod; public static function get index():Mod { return _instance ||= new Mod(); } public function init()...
来源: Laya_社区 发布时间: 20161218
...一个自定义事件,在B类添加侦听器监听事件,但是我在EventDispatcher类加了一个trace,事件没有派发成功,下面是testDemo LayaSample类: package { import laya.display.Sprite; public class LayaSample extends Sprite{ public static var event:String = "event"; public ...
来源: Laya_社区 发布时间: 20170604
...c function on(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher 在调用函数后面添加区分button的参数应该可以吧 189*****192 • 2017-04-26 09:33 @cyqcyqcyq:我也有另一种解决方式 for(var i:int=0;i<10;i++) { var btn:Button=new Button(); ....... bt...
来源: Laya_社区 发布时间: 20170425