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

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

101. LayaAir IDE 1.4.0新增功能 附加(扩展)脚本的使用 [ 61%]

...码,确保_owner不为null if(_isScal&&_owner) { _owner.on(Event.MOUSE_DOWN,this,onDown); } else { return; } } public function get isScale():Boolean { return _isScal; } public function set isScale(isScal:Boolean):void { this._isScal=isScal; } private function onDown():void { //按下,按...

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

102. 自己画的view不支持鼠标点击吗? [ 61%]

..."#123456"}); this.addChild(btn_1); btn_1.mouseEnabled=true; btn_1.on(Event.MOUSE_DOWN, this, onClickBt1);     不管怎么点,在这个点击方法里面是不会执行的  2018-07-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

103. 【求助】怎么在自定义对象进行实例化的时候,给它绑定监听事件 [ 60%]

...hName; this.type = type; this.index = index; this.setPath(); this.on(Event.MOUSE_DOWN, Food, test); } private function test():void{ trace("test"); }求高手指点啊,有没有好的办法完成这个需求啊,最近在做毕设,在这卡了两天了。。。 2018-04-07 添加评论 免费帖 ...

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

104. Tween动画中的Sprite点击事件失效 [ 60%]

...失效: 简单代码: var self = this; self.loserPrize.on(Laya.Event.MOUSE_DOWN,self,function(){     self.clickHanlder(); }) Laya.Tween.to(self.loserPrize, {      y: Laya.Browser.clientHeight }, Math.random() * 1500); self.gameZone.addChild(self.loserPrize);   大概如上 随手写出来...

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

105. 【求助】关于Cannot read property 'visible' of undefined问题 [ 60%]

...foodsList[this.index]; console.log(currentFood); this.currentFood.on(Event.MOUSE_DOWN, this, onMouseDown); this.currentFood.on(Event.MOUSE_UP, this, onMouseUp); }currentFood也是Food类,是用来指向在foodList中处于下标index的元素,我是想在用currentFood指向某个元素,给这...

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

106. touches一直为undefined [ 60%]

touches一直为undefined Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); ......   function onCtrlMoveRockerTouchDown(e) {     console.log("onCtrlMoveRockerTouchDown()");     var touches = e.touches;     if(touches) {     ...取出前两个touch进行计算     } }...

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

107. 鼠标事件:为什么没有设置穿透,也会发生穿透现象? [ 60%]

...     this.addChild(bg2);             bg2.on(laya.events.Event.MOUSE_DOWN,this,test); } ================== public static function createSprite(url:String,c:Boolean = false):Sprite {             var sp:Sprite = new Sprite();             sp.loadImage(url);        ...

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

108. list ,增加item ,我想在末尾增加,但是每次都给我翻倍的增加,如何解决 [ 59%]

...n.png"); button.pos(300, 0); this.roombg.addChild(button); button.on(Event.MOUSE_DOWN, this, function (e) { list.addItem(1); }); function Item() { Item.__super.call(this); this.size(416, 270); this.text = new Text(); this.text.fontSize = 20; this.text.pos(12, 5); this.text.color = "#FF00FF"; this.te...

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

109. runTime使用(ActionScript-IDE篇(AS3)-组件化开发相关) [ 59%]

... //添加鼠标按下事件侦听。按时时缩小按钮。 this.on(Event.MOUSE_DOWN,this,scaleSmall); //添加鼠标抬起事件侦听。抬起时还原按钮。 this.on(Event.MOUSE_UP,this, scaleBig); //添加鼠标离开事件侦听。离开时还原按钮。 this.on(Event.MOUSE_OUT,this, scaleB...

来源: Laya2.0_文档 发布时间: 20210714

110. 如何对3D精灵进行鼠标检测(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 59%]

...pescript { //在舞台上添加鼠标事件监听 Laya.stage.on(Laya.Event.MOUSE_DOWN,this, this.onMouseDown); } //点击触发事件 onMouseDown() { //记录点击到舞台上的点 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 th...

来源: Laya2.0_文档 发布时间: 20210715