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

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

401. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 49%]

...了。 如果要侦听点击某一个item的事件,不必每个item加上Click事件的侦听器,而是直接侦听列表的ClickItem事件: list.on(Laya.UIEvent.ClickItem, this, this.onClickItem); // 回调函数的第一个参数就是当前被点击的对象 function onClickItem(item: GObje...

来源: Laya3.0_文档 发布时间: 20251128

402. 显示对象的mask缩放为0时遮罩效果不生效 [ 49%]

...Child(testSp); let i = 0; tmpMask.scaleX = i / 3; Laya.stage.on(Laya.Event.CLICK, this, ()=>{ i = (i + 1) % 4; tmpMask.scaleX = i / 3; }); 附件 : --> 2020-04-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 ...

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

403. List选中项下滚会变 [ 49%]

...,index); // } _proto_.onMouse = function(e,index){ if(e.type == Laya.Event.CLICK){ //console.log(e.type,index); if(this.selectedIndex !== index){ if(this.selectedIndex!==-1){ //之前选中的列表项的选中状态设置为false this.sList.setItem(this.selectedIndex,{ select : {label : "服务器"...

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

404. ls场景文件通过Laya.loader.create()预加载后stage.destroyChildren()出现异常Cannot read property 'visible' of null [ 49%]

...附Demo。   想做不同场景之间的切换。 spriteBtn.on(Laya.Event.CLICK, this, function (e) { Laya.stage.destroyChildren(); newScene(); });问题:LayaAirUnityPlugin 1.1.0导出了 ls 场景文件,在通过Laya.loader.create()预加载后。在3次Laya.Scene.load()后,最后一次 Laya...

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

405. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 49%]

... url:String ="http://layabox.com/"; qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); qrcodeSp = new Sprite(); Laya.stage.addChild(qrcodeSp); } private function clickHandler():void { var url:String = qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以...

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

406. socket.sent [ 49%]

...t; public byte: Laya.Byte; constructor(){ super(); this.btn1.on(Laya.Event.CLICK,this,this.Btn1On); } Btn1On():void{ // socket.connect(“192.168.0.1.133”,8899); console.log("kjk"); this.socket.send("hello world");//这是发送字符串的形式。 //报错TypeError: Cannot read property 'send'...

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

407. 使用官方文档中qrcode生成二维码的代码,打包APP后无效 [ 49%]

...); var url: string = this.URL; this.qrcode.makeCode(url); Laya.stage.once("click", this, this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler(): void { var url: string = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步...

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

408. Animation 使用疑问 [ 49%]

... Animation 使用疑问 清理问题 内存没有发生变化 private onBtnClick(): void { this.body = new Laya.Animation(); this.body.y = -100; this.body.interval = 50; this.addChild(this.body); this.body.play(0, true, "hero_fly"); } private body: Laya.Animation; private onBtn2Click(): void { this....

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

409. list点击label保留一种状态 [ 49%]

...ndex = data[index]; var label = item.getChildByName('lab'); label.on(Event.CLICK,this,onClickBtn,[index]); } function onClickBtn(index){ for(var q = 0;q < 10;q++){ record_slide_list.getCell(q).getChildByName('lab').bgColor = '#f3d9b4'; } record_slide_list.getCell(index).getChildByName('lab').bgCo...

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

410. 两个小问题 [ 48%]

...个面板中含有几个按钮,分别为按钮添加 this.myBtn.on(Event.CLICK) 事件,点击某按钮后有时还会发送事件 this.event(...),在关闭面板时设置 this.removeSelf() ,下次生成同类型的对象面板可正常打开;若在关闭时设成 this.destroy() 或 this.de...

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