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

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

161. 如何获取list下单元格的坐标点? [ 76%]

... list.mouseHandler=new Handler(this,onClick); } private function onClick(e:Event,index:int):void { if(e.type==Event.CLICK) { trace("xy:"+list.getCell(index).x,list.getCell(index).y); } }上面的坐标是相对于list本身的,如果你想取得全局坐标可以通过localToGlobal方法来得到...

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

162. (有图片附件)图集用的atlas 在LayaAir里可以正常跑,但是发布后,运行报错 Failed to load file.Cross origin requests are [ 76%]

...onLoaded2 (main.min.js:1)     at e.run (laya.core.min.js:1)     at e.i.event (laya.core.min.js:1)     at e.n._endLoad (laya.core.min.js:6)     at e (laya.core.min.js:6)     at e.<anonymous> (laya.core.min.js:6)     at e.runWith (laya.core.min.js:1)     at e.i.event (laya.core.min...

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

163. Sprite-屏幕截图 [ 76%]

...ar btn = new Laya.Button(skin,name); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,this,cb); btn.size(147,55); btn.name = name; btn.right = 10; btn.top = index * (btn.height + 10); return btn; } onLoaded(){ for (let index = 0; index = ["res/button.png", "res/button.png", "res/button.png"]; priva...

来源: Laya2.0_示例 发布时间: 20260106

164. 如何与服务端建立连接 [ 76%]

...t + ":" + port; let socket:Laya.Socket = new Laya.Socket(); socket.on(Laya.Event.OPEN,this,()=>{ console.log("connect success!"); }) socket.connectByUrl(url);点此查看Socket官方示例 2018-05-15 1 0 分享 微博 QZONE 微信 rabbit 赞同来自: 只要前端的,还是要前端和后端代...

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

165. socket通讯返回数据 [ 76%]

...接 this.socket.connectByUrl("ws://localhost:8899"); this.socket.on(Laya.Event.OPEN, this, this.openHandler); this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler); this.socket.on(Laya.Event.CLOSE, this, this.closeHandler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler); // this.s...

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

166. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 76%]

...(已经找到问题) package { import laya.display.Sprite; import laya.events.Event; public class MainUi extends Sprite { private var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild...

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

167. sound manager在MOUSE_OVER事件中无法播放 [ 76%]

...Stage = Laya.Stage;     import Text = Laya.Text;     import Event = Laya.Event;     import SoundManager = Laya.SoundManager;     import Browser = Laya.Browser;     import Handler = Laya.Handler;     import WebGL = Laya.WebGL;      export class Sound...

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

168. 关于下拉列表的选择触发 [ 76%]

...ia1.loading_desc.text = "可在小秘境挂机获取" dia1.confirm.on(Laya.Event.MOUSE_UP, this, dai1, [dia1]) dia1.popup() // this.big_map.selectedIndex = 0 } } } 两个列表,手动选择会触发,没有问题,但如果在下面加一个修改下拉数据的 this.small_map.labels = “1,2...

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

169. 关于3d场景上Button点击事件顺序问题 [ 75%]

...按钮button。 2,在场景中加入了鼠标点击事件  Laya.stage.on(Event.MOUSE_DOWN,this,sceneClick);   private function sceneClick():void {     trace("scene clicked"); }   3,在button上添加按钮功能 button.on(Event.CLICK,this,onBtn); private function onBtn(e:Event):void {     e....

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

170. 关于下拉列表的选择触发 [ 75%]

...ia1.loading_desc.text = "可在小秘境挂机获取" dia1.confirm.on(Laya.Event.MOUSE_UP, this, dai1, [dia1]) dia1.popup() // this.big_map.selectedIndex = 0 } } } 两个列表,手动选择会触发,没有问题,但如果在下面加一个修改下拉数据的 this.small_map.labels = “1,2...

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