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

大约有 45 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0035 秒)

1. laya3d 增加全局触控 [ 100%]

...射线检测, 直接使用全局触控即可   var _self = this; document.addEventListener("mousedown",function(event){_self.onActDown(event);},false); document.addEventListener("mouseup",function(event){_self.onActUp(event);},false); document.addEventListener( 'touchstart', function(event){ _self....

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

2. 求HTTP相关的文档或者例子谢谢了 [ 99%]

...rDataFormat.VARIABLES*/"variables";             this.publicloader.addEventListener(/*iflash.events.Event.COMPLETE*/"complete",BIND$(this,this.checkListComp));             this.url=new URLRequest("wished.php");             this.url.method=/*iflash.net.URLRequestMethod.POST*...

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

3. 如何监听移动端软键盘的弹出和收回? [ 90%]

...idth=200; textInput.x=100; textInput.y=200; addChild(textInput); textInput.addEventListener(FocusEvent.FOCUS_IN,onFocusIn); textInput.addEventListener(FocusEvent.FOCUS_OUT,onFocusOut); private function onFocusIn(event:FocusEvent):void { textInput.text="你的键盘打开了"; } private function onFo...

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

4. 使用UrlLoader加载图片,flash获取data为byteArray,翻译成h5后data为image? [ 88%]

...r; public function UrlImage() { super(); if(stage) { init(); } else { this.addEventListener(Event.ADDED_TO_STAGE,init); } } private function init(e:Event=null):void { urlLoader=new URLLoader(); urlLoader.dataFormat=URLLoaderDataFormat.BINARY; urlLoader.addEventListener(Event.COMPLETE,onImageLoaded);...

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

5. 监听不到Laya.Event.RESIZE事件 [ 83%]

... 17:17 http://ask.layabox.com/question/155 这个问题里面的 textInput.addEventListener(FocusEvent.FOCUS_IN,onFocusIn); textInput.addEventListener(FocusEvent.FOCUS_OUT,onFocusOut);这两个事件有吗?我怎么没找到,还有就是里面写的Laya.stage.on(Laya.Event.RESIZE,this,this.onSta...

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

6. 打包APP后,监听的事件Event.BLUR和Event.FOCUS失效? 请问下是APP的处理方式不一样吗? [ 83%]

... 2 分享 微博 QZONE 微信 KevinWoo 赞同来自: Laya.Browser.document.addEventListener("resume", this.focus); Laya.Browser.document.addEventListener("pause", this.pause);   监听这两个事件就可以了。 2018-07-26 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 ...

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

7. 如何启用摇一摇 [ 83%]

...; __JS__('var canShake = 1'); __JS__('if (window.DeviceMotionEvent){window.addEventListener("devicemotion", deviceMotionHandler, false)'); __JS__('}else{alert("你的设备不支持DeviceMotion事件");}'); __JS__('function deviceMotionHandler(eventData){var acceleration = eventData.accelerationIncl...

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

8. LayaAir引擎与原生Flash的差异文档说明! [ 81%]

...; mask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask; addEventListener(Event.ENTER_FRAME,function():void { mask.x++; mask.cacheAsBitmap=true; sp.cacheAsBitmap=true; }); LayaAir环境下: 1、静态遮罩  Laya.init(600,400) var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0...

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

9. LayaFlash针对资源的加载是同步还是异步? [ 81%]

...ain extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); this.stage.scaleMode = StageScaleMode.NO_SCALE; this.stage.align = StageAlign.TOP_L...

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

10. 鼠标点击穿透问题 [ 79%]

...hics.drawRect(100,100,200,200); sp1.graphics.endFill(); addChild(sp1); sp1.addEventListener(MouseEvent.CLICK,onSp1); var sp2:Sprite=new Sprite(); sp2.graphics.beginFill(0xFFFF00); sp2.graphics.drawCircle(200,200,100); sp2.graphics.endFill(); addChild(sp2); sp2.mouseEnabled=false; sp2.addEventListene...

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