大约有 310 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0051 秒)
...播放 // 设置画布上的对齐参照物 reference = new Sprite(); this.addChild(reference); reference.pos(0, 0); reference.size(GoldConsts.contextWidth, GoldConsts.contextHeight); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#cccccc"); // 每次舞台尺寸变更时,...
来源: Laya_社区 发布时间: 20180313
... var btn:Button = new Button(skin); //将Button添加到舞台 Laya.stage.addChild(btn); //设置Button相关的属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } } } ``` 上述代码运行效果如动图2所示:  (动图2) **Tips:** Button 组...
来源: Laya2.0_文档 发布时间: 20210715
...lor="#ffffff"; text.text="hello!LayaBox!"; text.font=mFontName; Laya.stage.addChild(text); } } }测试结果: 1、value=top 2、value=middle 3、value=bottome 总结:并未发现你所说的问题,请用最新版本1.5.3进行测试,如果还有问题,提供个demo,我们查下问...
来源: Laya_社区 发布时间: 20161116
...on onLoaded():void { //实例UI界面 listP = new ListPageUI(); Laya.stage.addChild(listP); Laya.timer.once(1000,this,onAdd);//1000毫秒后初始化list数据 listP.add.on(Event.CLICK,this,onAddClick);//点击添加按钮 listP.remove.on(Event.CLICK,this,onRemoveClick);//点击删除按钮 } privat...
来源: Laya_社区 发布时间: 20170313
...void { //实例UI界面 var testView:TestView = new TestView(); Laya.stage.addChild(testView); __JS__("if(window.conch)") { dd=__JS__("window.loadingView"); dd.loading(100); } } } } 2016-09-18 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起...
来源: Laya_社区 发布时间: 20160918
...图片到舞台 var sp = new Laya.Sprite(); sp.loadImage(url); Laya.stage.addChild(sp); //添加到舞台 }; GameMain.prototype.errorHandler = function (e) { }; return GameMain; }()); new GameMain(); //# sourceMappingURL=LayaSample.js.map 但运行在玩一玩平台下调用相同代码则返回Requ...
来源: Laya_社区 发布时间: 20180629
...到舞台; var sp:Sprite = new Sprite(); sp.loadImage(url); Laya.stage.addChild(sp);//添加到舞台 } private function errorHandler(e:Object):void { } 是无法显示图片的 而用JS开发,用JS的事例,却是可以显示的 2017-10-11 添加评论 免费帖 --> 分享 微博 QZONE 微...
来源: Laya_社区 发布时间: 20171011
...labelSize = 12; button.labelColors = '#000000,#000000,#000000'; Laya.stage.addChild(button); return button; } private onClick(): void { // 触发浏览器文件上传框 let fileInput = Laya.Browser.document.getElementById('file'); fileInput.click(); console.log(fileInput);//input#file } } new GameM...
来源: Laya_社区 发布时间: 20170511
...ite=new Sprite(); sp1.graphics.drawRect(0,0,200,400,"#FF0000"); Laya.stage.addChild(sp1); var sp2:Sprite=new Sprite(); sp2.graphics.drawRect(0,0,300,400,"#0000FF"); sp2.pos(100,100); if(sp1.getBounds().intersects(sp2.getBounds())) { trace("相交了"); }发布如下: 2016-12-03 0 4 分享 微...
来源: Laya_社区 发布时间: 20161202
... this.aniBirdSing.height); this.aniBirdSing.mouseEnable = true; Laya.stage.addChild(this.aniBirdSing); } 根据这个代码,我认为鼠标点击区域在图片左下区域,但结果是图片左上区域,求解? 如果我想让图片的点击区域是图片左下区域,应该如何出来...
来源: Laya_社区 发布时间: 20171026