大约有 441 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0056 秒)
Laya_社区(255) Laya2.0_api(57) laya_api(53) Laya2.0_文档(29) Laya3.0_文档(17) Laya2.0_示例(15) Laya_示例(13) Laya3.0_api(2)
...图片区域的点击事件,触发后执行switchImg切换图片 img.on("click",this,switchImg); //将图片添加到舞台 Laya.stage.addChild(img); } private function switchImg(e:*=null):void { //清空图片 img.graphics.clear(); //获得要切换的图片资源路径 var imgUrl:String = (flag ...
来源: Laya2.0_文档 发布时间: 20210715
... container.hitArea = bg2Sprite; container.on(Event.CLICK,this,deskClick); 请问下 我这段代码设置热区 为什么没反应 而且现在看HitArea这个类也没有 api里面没找到 都不知道怎么用了,http://ask.layabox.com/question/2676 这个方法无效 而...
来源: Laya_社区 发布时间: 20170223
...然后实例化view页面。以下是简单的代码示例: btn.on(Event.CLICK,this,onClick); //在onClick函数中写以下代码 var testView:TestView = new TestView(); Laya.stage.addChild(testView); 其实你也可以创建一个UI示例项目看下里边是怎么调用的 2017-06-29 1 0 分享...
来源: Laya_社区 发布时间: 20170629
Laya事件不能添加给多边形吗? var clickRect = new Laya.Sprite(); clickRect.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height-100, "#ffffff" ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, function(){ console.log( 'adf' ) } ); 我创建一个多边...
来源: Laya_社区 发布时间: 20180201
....height - 100 * Laya.Browser.pixelRatio); changeActionButton.on(Laya.Event.CLICK, this, function () { layaPlane.getChildAt(0).meshRender.material.diffuseTexture = renderTargetCamera.renderTarget; }); })); } function setMaterials(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite...
来源: Laya_示例 发布时间: 20251130
...正常,LayaAir IDE 2.2.0beta2版本报错 Laya.stage.on(Laya.Event.CLICK, this, () => { Laya.loader.load("HallAni/star.part", Laya.Handler.create(this, (settings) => { let Particle2D = Laya.Particle2D; ...
来源: Laya_社区 发布时间: 20190808
...DemoView); var btn = ListDemoView.getChildByName("startbtn"); btn.on(Event.CLICK, this, clickHandler); 这样不行 2018-05-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 181*****859 赞同来自: 已解决 201...
来源: Laya_社区 发布时间: 20180524
...0, 60, Laya.Handler.create(this, function(){ ape.on(Laya.Event.CLICK, this, function(){ console.log(111) }) }));使用这段代码加载了一个60x60大小的图片(下图中骑马的那个人物),并且在加载完成的回调给这个图片添加点击事件,...
来源: Laya_社区 发布时间: 20180609
...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` (图1)
来源: Laya2.0_文档 发布时间: 20210715
...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK, this, function():void { this.camera.removeAllLayers(); this.layerIndex ++; this.camera.addLayer(this.layerIndex%4 +1); this.camera.addLayer(5); }); ``` (图1)
来源: Laya2.0_文档 发布时间: 20210715