• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 18 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0028 秒)

1. List数据源的格式问题导致无法响应List的SelectHandler [ 100%]

...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

2. EventDispatcher接收不到参数 [ 99%]

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

3. EventDispatcher.hasListener问题 [ 97%]

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

4. Laya.EventDispatcher off 删除侦听器 [ 96%]

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

5. http 请求 once 的 回调参数,如何传递和接收? [ 83%]

...function once(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知,此侦听事件响应一次后自动移除。 Parameters type:String — 事件的类型。  ...

来源: Laya_社区 发布时间: 20180304

6. Laya.sprite.on 绑定事件传参数的问题 [ 83%]

...c function on(type:String, caller:*, listener:Function, args:Array = null):EventDispatcher使用 EventDispatcher 对象注册指定类型的事件侦听器对象,以使侦听器能够接收事件通知。 Parameters type:String — 事件的类型。   caller:* — 事件侦听函数的执行...

来源: Laya_社区 发布时间: 20170308

7. swf预加载问题 [ 79%]

...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

8. 在Test中有个按钮点击,那么我如何发信号,使得这个点击能给控制Sample中的对象,如何调用函数 [ 74%]

...事件,在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

9. event自定义事件的问题 [ 72%]

...一个自定义事件,在B类添加侦听器监听事件,但是我在EventDispatcher类加了一个trace,事件没有派发成功,下面是testDemo LayaSample类: package { import laya.display.Sprite; public class LayaSample extends Sprite{ public static var event:String = "event"; public ...

来源: Laya_社区 发布时间: 20170604

10. 多个button如何区分 [ 71%]

...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