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

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

261. 使用loadImage加载一个图片后的点击事件 [ 57%]

...0, 60, Laya.Handler.create(this, function(){         ape.on(Laya.Event.CLICK, this, function(){         console.log(111)     }) }));使用这段代码加载了一个60x60大小的图片(下图中骑马的那个人物),并且在加载完成的回调给这个图片添加点击事件,...

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

262. 获取的ui页面里下on事件无法触发 [ 57%]

...rtView = function () { GameStartView.super(this); this.Start.on(Laya.Event.CLICK, this, this.open); console.log(this.Start); GameStartView.prototype.open = function(){ console.log("Open is ok"); } }; Laya.class(GameStartView,"GameStartView", GameStartUI); 输出:Button {toggle: false, _bitmap: Aut...

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

263. Sprite3D的Layer(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 57%]

...... //切换图层按钮事件监听 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); }); ``` ![](img/1.gif)(图1)

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

264. Sprite3D的Layer(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 57%]

...... //切换图层按钮事件监听 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); }); ``` ![](img/1.gif)(图1)

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

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

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

266. 使用缓动动画点击按钮缩小,放开鼠标还原怎么弄 [ 57%]

...,事件执行还原缓动动画 如果还有点击事件,继续监听click事件即可 2017-04-01 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: 缓动完成后会有一个完成缓动的回调函数,你直接在回调函数里做还原操作即可! 2017-03-18 0 1 分享 微博 QZON...

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

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

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

268. List生成背包问题 [ 56%]

...时候就会显示出list。 下边有我的项目源码,RunGame.js中的Click_Bag方法是生成背包的,item子项是BagItem.js文件。项目运行起来点击坐骑图标是弹出背包,现在没有背包图标暂时用的坐骑的替代。小弟新手,希望遇到此类情况,或者...

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

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

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

270. ts如何调用js函数? [ 56%]

...pbox(options); } reader.readAsDataURL(this.files[0]); }) $('#btnCrop').on('click', function(){ var img = cropper.getDataURL(); //$('.cropped').append('<img src="'+img+'">'); }) } 如果直接在ts里面写,报错,那么如果放在js里面。。如何通过ts调用呢?? 2018-01-01 添...

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