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

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

191. 刚刚接触2天layaair,有几个问题请教。 [ 59%]

...n1,但不知道怎么调用,强行在Main.js里面写入 btn1.on(Event.CLICK, this, onBtnClick); function onBtnClick() { alert('222'); } btn1 is not defined 按教程写脚本,实在找不到地方写,请问有没有类似教程呢。 问题3)我在Scenes 新建了2个view,一个是v1一...

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

192. 请问object层中添加的sprite怎么添加点击事件 [ 59%]

...ight = 100; flower.width = 100; flower.size(100,100); flower.on(Laya.Event.CLICK,this,function() {    alert("My Name is Bear"); }); mallLayer.addChild(flower); mallLayer._showGridList.push(flower); 附件 : --> hxwlworld.zip 2018-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

193. Dialog中编辑的动画如何控制? [ 59%]

...play的第一个参数是从第几帧开始播放 Laya.stage.on(Laya.Event.CLICK,this,onClick); } Laya.class(TestUI, "TestUI", TestPageUI); function onClick() { this.ani1.stop();//停止播放 this.ani1.index=30;//index为帧索引,停止到第几帧 } 2017-05-27 0 1 分享 微博 QZONE 微信 为...

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

194. Sprite3D的Layer(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 59%]

...r = 4; ...... //切换图层按钮事件监听 changeActionButton.on(Event.CLICK, this, function():void { camera.removeAllLayers(); layerIndex ++; camera.addLayer(layerIndex%4 +1); camera.addLayer(5); }); ``` ![](img/1.gif)(图1)

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

195. 骨骼动画如何响应点击事件? [ 59%]

...点击事件,求助   //响应点击事件 humanSkeleton.on(Laya.Event.CLICK,this,onclickHuman);   function onclickHuman(){ console.log("onclickHuman"); } https://www.cnblogs.com/Jackie-Snow/p/8487607.html 网上的这个方式试了,没用,按照网上说是没有设置width与height 但是...

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

196. laya如何用audio播放音频? [ 59%]

...ioElement; constructor(){     super();     this.btn_play.on(Laya.Event.CLICK, this, this.onPlay);     this.elentAutio = <HTMLAudioElement>document.createElement('audio');     this.elentAutio.src="res/10.mp3"; } onPlay():void{     this.elentAutio.play(); }   由于要播放一些跨...

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

197. 显示与切换图片(JavaScript-LayaAir基础篇(JS)-位图) [ 59%]

...55, 72); ape.pos(200, 200); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } function switchTexture() { var textureUrl = (flag = !flag) ? texture1 : texture2; // 更换纹理 ape.graphics.clear(); ape.loadImage(textureUrl); var texture = Laya.loader.getRes(textureUrl); ...

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

198. 循环监听按钮,如何进行传参和接受参数 [ 59%]

... as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         let b = event.currentTarget as Laya.Image; console.log('onClickLevel > ' + b.skin); this.removeSelf(); Laya.stag...

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

199. 类似于list下的按钮监听 !如何去做。 [ 59%]

...6-28 23:26 给 Sprite 中 按键设置name ,然后通过 Sprite.on(Event.CLICK,this,yfqian_GameUi); public function yfqian_GameUi(e:Event):void{ trace("Sprite:",e.target.name) }

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

200. 怎么做到第二次点击color的时候lable背景颜色变回原来的颜色 [ 59%]

...is.label.bgColor = "#ff0400"; start(): void { this.color_btn.on(Laya.Event.CLICK, this, this.onTipClick); } if(tipBtn == this.color_btn){ this.label.bgColor = "#ffffff";   2019-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 ...

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