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

大约有 117 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0033 秒)

61. HTMLDIVElement设置innerHTML时报错 [ 72%]

...l.contextWidth, html.contextHeight); Laya.stage.addChild(html); setTimeout(function() { html.innerHTML = ''; }, 300);此问题是由于在新版中改变了laya.html.js的HTMLDivElement中width的set方法 之前的版本中,set方法为/** *获取对象的宽 */ __getset(0,__proto,'width',functio...

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

62. 引入Puremvc.js,编译没问题,运行时报错查不到 [ 72%]

...未被定义,需要把puremvc绑定到window上 if( typeof define === "function" ) {     define( "puremvc", [], function()     { var puremvc; (function (puremvc) { "use strict"; //... })(puremvc || (puremvc = {})); }) } //修改为: var puremvc=window.puremvc||(window.puremvc={}); (funct...

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

63. 引擎这一句是不是疏忽了? [ 72%]

...应用到刚体上的所有力。     */     __proto.clearForces=function(){         var rigidBody=this._nativeColliderObject;         if (rigidBody==null)             throw "Attempted to call a Physics function that is avaliable only when the Entity has been alre...

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

64. bind函数的作用 [ 71%]

...otoLoaded.bind(this)); a15715740412 • 2018-01-30 16:31 /** * For a given function, creates a bound function that has the same body as the original function. * The this object of the bound function is associated with the specified object, and has the specified initial parameters. * @param thisArg A...

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

65. 打包后启动游戏后报错 [ 71%]

...在浏览器里都可以正常运行,打包后才会出现问题 public function send(type:String,url:String,callbackName:String):void { this.type = type; //发送请求 var script:* = Browser.createElement("script"); script.id = "serverlist"; Browser.document.head.appendChild(script); script.src ...

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

66. 关于HttpRequest报错问题 [ 71%]

....ERROR,this,errorHandler); xmlHttp.on(Event.PROGRESS,this,processHandler); function onHttpRequestComplete(e){ }; function processHandler(data){ console.log(data); }; function errorHandler(data){ }; xmlHttp.send("http://","","post","text"); 2018-02-02 添加评论 免费帖 --> 分享 微博 QZONE ...

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

67. 动态加载代码后,总是出现 ProgressBar is not a constructor [ 70%]

...是出现 ProgressBar is not a constructor //动态加载js文件--my.js function loadJs(jspath,defer = true) { //得到html的头部dom // var theHead = document.getElementsByTagName('head').item(0); var theHead = document.getElementsByTagName('body').item(0); //创建脚本的dom对象实例 var m...

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

68. js飞机大战报错 请大神看看 [ 69%]

...l=null;          this.infoLabel=null; GameInfo.js: var GameInfo = (function (_super) {     function GameInfo() {         GameInfo.super(this);         // this.infoLabel.text = "abc"; 这个也报异常应该是找不到infoLabel         // 注册按钮点击事件 点击后暂...

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

69. 版本管理 后缀可以自定吗? [ 69%]

...ginURL 源路径。 * @return 格式化后的新路径。 */ public static function addVersionPrefix(originURL:String):String { if (manifest && manifest[originURL]) { if (type == FILENAME_VERSION) return manifest[originURL]; return manifest[originURL] + "/" + originURL; } return originURL; }...

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

70. 飞机大战js源码中判断语句问题 [ 69%]

飞机大战js源码中判断语句问题 (function Game() { var Sprite = laya.display.Sprite; //定义背景容器 var box; //定义背景1 var bg1; //定义背景2 var bg2; (function () { //初始化引擎,设置游戏的宽高 Laya.init(480, 852); //创建一个容器,用于存放背景图...

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