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

大约有 1,162 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0087 秒)

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

...windows下同个版本加载正常 Mac下的AS3代码如下:   private function init():void {         var assetArr:Array=[             {url:"res/sound/music_gameplay.mp3", type:Loader.SOUND},             {url:"res/sound/button.mp3", type:Loader.SOUND},            ...

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

652. 发布web,选择压缩混肴js后,运行报错,正常编译后可以运行项目 [ 65%]

....event (LayaSample.max.js:1)     at new i (LayaSample.max.js:1)     at Function.t.regSession (LayaSample.max.js:1)     at t.i.initSession (LayaSample.max.js:1)     at Function.t.INIT (LayaSample.max.js:1)     at i.execute (LayaSample.max.js:1)     at Function.t.exeCMD (LayaSample.max.js:...

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

653. 用JS原生态window.location.href跳转 [ 65%]

...events.Event; import laya.utils.Browser; public class LayaAirTest { public function LayaAirTest() { Laya.init(550,400); var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FFFF00"); Laya.stage.addChild(sp); sp.size(1000,100); sp.on(Event.CLICK,this,onClick); } private function onClick():v...

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

654. tiledMap类createMap()创建地图 如何理解这个viewRect视口区 [ 65%]

...var mLastMouseY = 0;      var mX = 0;     var mY = 0;      (function()     {         createMap();          Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown);         Laya.stage.on(Event.MOUSE_UP, this, mouseUp);     })(); //创建地图     function ...

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

655. laya打包iOS,运行奔溃,构建时候选择的是2.3.0 [ 65%]

...: exception info:[TypeError: this._nativeObj.addGlobalValueDefine is not a function.(In "this._nativeObj.addGlobal ValueDefine(modifyType, type, size, defaultData)", "this._nativeObj.addGlobalValueDefine" is undefined)] at line  4664. 附件 : --> 2020-02-18 添加评论 免费帖 --> 分享 微博...

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

656. httpRequest send返回Request failed Status:0 [ 65%]

...下 var WebGL = Laya.WebGL; // 程序入口 var GameMain = /** @class */ (function () { function GameMain() { //初始化引擎 Laya.init(1136, 640); for (var i = 0; i < 4; i++) { var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(); var url = "http://thirdqq.qlogo.cn/g%3Fb% ... 3B%3B xhr...

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

657. 那个文本溢出需要滚动条怎么弄,API里面就说用Scroll接口,小白 不懂怎么弄 [ 65%]

... QZONE 微信 hj 赞同来自: Laya.init(500,400,Laya.WebGL);createText();function createText(){this.txt = new Laya.Text();this.txt.overflow = Laya.Text.SCROLL;this.txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!\n...

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

658. 按照打地鼠教程来无法正常加载资源 [ 65%]

...程来无法正常加载资源 public class Main{         public function Main(){             //初始化引擎             Laya.init(1136, 640);             Laya.stage.bgColor = "#ffcccc";             var resArr:Array = [           ...

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

659. 关于event中只读属性touches,问题,求解 [ 65%]

...aya.events.Event; import laya.webgl.WebGL; public class DemoTouch { public function DemoTouch() { Laya.init(800, 600, WebGL); Laya.stage.bgColor = "#232628"; var txt:Text = new Text(); txt.text = "hello"; txt.color = "#FF00FF"; txt.width = 100; txt.height = 100; txt.x = 200; txt.y = 100; txt.fontSiz...

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

660. 绘制形状时事件不触发 [ 65%]

绘制形状时事件不触发 function myRing(x,y,r1,color1,r2,color2) {         this.sprite = new Laya.Sprite();     this.sprite.on('mousedown', this, on_down);     this.sprite.graphics.drawCircle(x, y, r2, color2, color2, 2);     this.sprite.graphics.drawCircle(x, y, r1, color1, color...

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