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

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

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

...:URLLoader; private var l:Loader; 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...

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

1762. Laya2.2.0,官方demo,Iphone Xs Max 14.0 锁屏小游戏卡死 [ 63%]

...ppStatus = AppEvent.onShow; console.log(this.appStatus, '---------'); Laya.stage.renderingEnabled = true//恢复渲染 Laya.updateTimer.resume() //恢复onUpdate Laya.timer.resume(); //恢复时间 Laya.timer.scale = 1; }) window['wx'].onHide(() => { this.event(AppEvent.onHide); this.appStatus = ...

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

1763. Error: 代码包大小为 5533 kb,上限为 4096 kb,请删除文件后重试? [ 63%]

....Browser.height); this.current = { x: 0, y: Laya.Browser.height }; // Laya.stage.bgColor = "#3F51B5"; this.sp = new Laya.Sprite(); Laya.stage.addChild(this.sp); } render() { console.log("render"); var l = [ 0, 0, 0, -(Laya.Browser.height >> 1), (Laya.Browser.width>>1), -(Laya.Browser.hei...

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

1764. layabox怎样实现相对布局? [ 63%]

...3 苍蝇也是鸟 • 2018-05-23 17:21 @Laya_Aaron:现在比较常用的是Stage.SCALE_SHOWALL 就是有一边会留黑边。市面上的H5游戏大都这样做。但是我的需求是像APP一样做全屏适配,舞台宽度固定,高度自适应。子对像根据舞台高度做相对布局,...

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

1765. as hello world 背景还是黑色 [ 63%]

...ublic function LayaSample() { //初始化引擎 Laya.init(1136, 640); Laya.stage.bgColor = "#ffffff"; var sp : Label = new Label("hello world"); //sp.fontSize = 55; sp.pos(100, 100) ; //sp.color = "#000000"; Laya.stage.addChild(sp); } } } chrome 下查看源代码 <html> <head> <meta ...

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

1766. 使用方向键 控制精灵在格子中移动 [ 63%]

...RPG游戏开发 可以加我的微信 一起研究 13890999   事件 Laya.stage.on(Laya.Event.KEY_UP,this,this.onkeyup); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown); Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(thi...

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

1767. 关于graphics镂空的问题https://ask.layabox.com/question/139 [ 63%]

...Box.autoSize = true; redBox.graphics.drawRect(0,0,100,100,'#ff0000'); Laya.stage.addChild(redBox); redBox.on("click",this,function(){ trace("click redbox"); }); redBox.on("mouseover",this,function(){ redBox.graphics.clear(); redBox.graphics.drawRect(0,0,100,100,'#00ff00'); }); redBox.on("mouseout",t...

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

1768. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 62%]

... new PanelRotationTest(Laya.Sprite); testSpriteRotation.pos(300,260); Laya.stage.addChild(testSpriteRotation); var testPanelRotation:PanelRotationTest = new PanelRotationTest(Laya.Panel); testPanelRotation.pos(1000,260); Laya.stage.addChild(testPanelRotation); Laya.Tween.to(testPanelRotation,{rotati...

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

1769. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 62%]

...了第:"+index+"个btn"); } //初始化引擎 Laya.init(600, 400); Laya.stage.bgColor='#EEFFCC'; Laya.loader.load("res/atlas/comp.json", Handler.create(this, onAssetLoaded), null, Loader.ATLAS); //添加UI界面 function onAssetLoaded() { Laya.stage.addChild(new TestUI()); } 附件 : --> ButtonCli...

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

1770. 分享:Panel下动态修改子容器宽高并刷新显示! [ 62%]

...g';//设置panel的垂直滚动条,方便看出panel的滚动变化 Laya.stage.addChild(panel); var sp:Sprite=new Sprite();//panel的子容器sp sp.graphics.drawRect(0,0,500,1000,"#FF0000"); sp.size(500,1000); panel.addChild(sp); var btnAdd:Button=new Button();//点击按钮,动态添加sp的子...

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