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

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

1661. layanative安卓端需要怎么添加ttf字体,需要增加两种字体? [ 59%]

...{ Laya.init(1000, 900);   Laya.loader.load("res/remember.ttf",new Handler(this,test)); }   private function test():void { var text:Text; text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = "你好"; text.pos(100, 100); Laya.stage.addChild(text);   text = new Text(); text.fo...

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

1662. 怎么打开第二个工程 [ 59%]

...{ public function Main() { Laya.init(500,500); Laya.stage.once(Event.CLICK,this,this.clickHandler); } private function clickHandler():void { var iframe:Object = Browser.document.createElement("iframe"); iframe.style.position ="absolute";//设置布局定位。这个不能少。 iframe.style.zIndex =...

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

1663. Animation的createFrames为何加载不了有的图集资源 [ 59%]

...{url: "res/atlas/char_wudang01.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); this.onLoaded(); } private function onLoaded():void { //Animation.createFrames(["res/atlas/monsterbeattack/0.png","res/atlas/monsterbeattack/1.png","res/atlas/monsterbeattack/2.png"], "aa") Animation.createF...

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

1664. HTML文本 · LayaAir3.0文档 · LAYABOX [ 59%]

...om/'>LayaBox欢迎你的加入!</span>"; div.on(Laya.Event.LINK,this,(data:any)=>{ Laya.Browser.window.location.href=data; }); Laya.stage.addChild(div); 运行效果: 点击文字链接可以打开浏览器访问网址 3.6 实现html页面跳转 示例如下: var iHtml:HTMLIframeEl...

来源: Laya3.0_文档 发布时间: 20230303

1665. 分享:SWF LABEL标签的使用! [ 59%]

...EEFFCC"; mc=new MovieClip(); mc.load("output/AAA.swf"); mc.on(Event.LOADED,this,onLoaded); Laya.stage.addChild(mc); } private function onLoaded():void { mc.addLabel("label01",19); mc.addLabel("label02",39); mc.addLabel("label03",59); mc.on(Event.LABEL,this,onLabel);//运行到对应的帧数,会...

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

1666. box2d动态创建绑定多个关节报错 Node:the component is singleton,can't add the second one. [ 59%]

...tOther.x, potOther.y] distanceJoint.selfAnchor = [potSelf.x, potSelf.y];  this.owner.addComponentIntance(distanceJoint);   }报错信息如下: Node:the component is singleton,can't add the second one.   翻看源码后发现有这么一段判断单例组件的限制 __proto.addComponentIntance...

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

1667. 想用js写一个什么也不继承的类,但每次实例化这个类的时候会报错,是不是这个类写得不对呀 [ 59%]

...呀 var Test = (function(_super){ function Test(){         Test.super(this);         console.log("执行测试构造函数"); } //注册类 Laya.class(Test,"Test",_super); //获取执行域 var _proto = Test.prototype; //_proto. return Test; })(); 2018-06-05 添加评论 免费帖 --> 分享...

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

1668. MovieClip 报错 [ 59%]

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

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

1669. layaFlash 无法使用 Loader 加载外部SWF和图片 [ 59%]

...rite { public function SwfBinary() { super(); if(stage) { init(); } else { this.addEventListener(Event.ADDED_TO_STAGE,init); } } private function init(e:Event=null):void { var loader:Loader=new Loader(); var context:LoaderContext=new LoaderContext(false,ApplicationDomain.currentDomain); loader.conte...

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

1670. 微信小游戏中iPhoneX的适配问题 [ 59%]

...re Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); })); kezhiyu • 2018-06-04 14:38 ...

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