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

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

1681. 关于位图字体的valign属性问题 [ 58%]

...0); mBitmap=new BitmapFont(); mBitmap.loadFont("date/data.fnt",new Handler(this,onLoadedFnt)); } private function onLoadedFnt():void { // TODO Auto Generated method stub Text.registerBitmapFont(mFontName,mBitmap); var text:Text=new Text(); text.pos(300,200); text.size(200,80); text.pivotY=text.heigh...

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

1682. 引擎的text类中有没有直接读取Json文件的函数 [ 58%]

...Demo() { Laya.init(500,400); Laya.loader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String=JSON.stringify(json); trace(str); } } } 2017-08-07 0 0 分享 微博 QZONE 微信 为什...

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

1683. Mac下LayaAirIDE1.7.20版本声音预加载失败,但windows下同个版本加载正常 [ 58%]

...UND}         ];         Laya.loader.load(assetArr,Handler.create(this,onComplete),Handler.create(this,onProgress)); } private function onProgress(loadNum:Number):void { }   private function onComplete():void { } 附件 : --> 2018-11-12 添加评论 免费帖 --> 分享 微博 QZONE 微信...

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

1684. 使用webgl之后toDataUrl返回黑色的图像 [ 58%]

...L); Stat.show(); Laya.stage.bgColor = "#ffcccc"; Laya.stage.on(Event.CLICK,this,onClick); sp= new Sprite(); sp.name='base'; sp.loadImage("logo.png"); Laya.stage.addChild(sp); } private function onClick():void { var htmlsss:String=(Laya.stage.getChildAt(0) as Sprite).drawToCanvas(100,100,0,0).getCanv...

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

1685. 打包之后TEXT可以显示但是 加载其他资源时白屏 [ 58%]

..."], type: Laya.Loader.IMAGE }); Laya.loader.load(asset,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var s = new laya.display.Sprite(); s.graphics.drawTexture(Laya.loader.getRes("../res/image/bg.png"),0,0);  Laya.stage.addChild(s); } 新建一个工程 這样写打包之后会白...

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

1686. 我来改代码! [ 58%]

...ERROR,"file not find"); return; } //保护修改-----end------------------ this.basePath =_atlasPath?Loader.getAtlas(_atlasPath).dir:_url.split(".swf")[0] + "/image/"; _initData(data);添加了这个保护后,代码不会报错,但是你的帧循环使用创建MC不会显示,不显示的原因...

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

1687. http请求能否取消 [ 58%]

... * 清除当前请求。 */ protected function clear():void { var http:* = this._http; http.onerror = http.onabort = http.onprogress = http.onload = null; } 2016-12-05 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 zhjinshiboy 相关问...

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

1688. Tree属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 58%]

...e/clip_tree_arrow.png" ]; //加载资源 Laya.loader.load(res, new Handler(this, onLoadComplete)); } /***加载资源完成***/ private function onLoadComplete(e:*=null):void { // 组装tree的数据 var treeData:String = ""; //外层循环为树的父节点(相当于文件夹) for(var i:int = 0...

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

1689. Canvas模式下不报错,WebGL模式下运行时报错 [ 58%]

...WebGLContext2D.fileRect()方法,具体行见截图   RenderContext类:this._drawRect=function(x,y,args){                 var ctx=this.ctx;                 if (args[4] !=null){                     ctx.fillStyle=args[4];                     ct...

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

1690. Button属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 58%]

...ff"; //加载资源成功后,执行onLoaded回调方法 Laya.loader.load(this.skin,Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个Button实例 var btn:Laya.Button = new Laya.Button(this.skin); //将Button添加到舞台上 Laya.stage.addChild(btn); //设置Butto...

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