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

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

81. 仿照laya官方demo做了一个视频播放的UI,为啥在微信里不能用? [ 80%]

...素 let videoElmt: any = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElmt); // 设置Video元素地样式和属性 videoElmt.style.zInddex = Laya.Render.canvas.style.zIndex + 1; videoElmt.src = getResURI("video/guide.mp4"); videoElmt.controls = false; videoElmt.a...

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

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

...on loadJs(jspath,defer = true) { //得到html的头部dom // var theHead = document.getElementsByTagName('head').item(0); var theHead = document.getElementsByTagName('body').item(0); //创建脚本的dom对象实例 var myScript = document.createElement('script'); myScript.src = jspath; //指定脚...

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

83. 怎么打开第二个工程 [ 79%]

...ler); } private function clickHandler():void { var iframe:Object = Browser.document.createElement("iframe"); iframe.style.position ="absolute";//设置布局定位。这个不能少。 iframe.style.zIndex = 100;//设置层级 iframe.style.left ="100px"; iframe.style.top ="100px"; iframe.src = "http:...

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

84. 分享问题解决,关键词:canvas不在左上角,鼠标点击位置偏移怎么办 [ 79%]

..._event.nativeEvent = nativeEvent || e; _this._target = null; var docElem = document.documentElement var win = document.defaultView var clientBox = Browser._container.getBoundingClientRect() this._point.setTo((e.pageX || e.clientX)-clientBox.x - win.pageXOffset - docElem.clientLeft,(e.pageY || e.clie...

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

85. Laya下的图片上传示例(完整版) [ 79%]

...位置一致,这里我们默认在0点位置 var file:any = Laya.Browser.document.createElement("input"); var img:any = Laya.Browser.document.createElement("img"); //设置file样式 file.style="filter:alpha(opacity=0);opacity:0;width:200px;height:100px;background:url(b1.png) no-repeat center;curs...

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

86. 构建好android studio项目后,debug出错 [ 79%]

...function, class) not yet supported outside strict mode at eval (native) at Document._downloadOk (apploader.js:6059:20) at apploader.js:6038:20 at FileReader.filereader.onload (apploader.js:6732:47) >>>>>>>>>>>>>>>evalhttp://stand.alone.version/libs/laya.u...

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

87. 关于 iframe跳转地址 [ 79%]

...ttp://119.29.138.145/bgame/index.html(游戏地址 正式服) var iframe = document.createElement("iframe"); iframe.id = "iframe"; iframe.name = "iframe"; iframe.frameBorder = "no"; iframe.marginwidth="0px"; iframe.marginheight="0px" ; iframe.scrolling = "no"; iframe.border="0px" iframe.style.positi...

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

88. layaair2-cmd compile 编译不了 [ 79%]

layaair2-cmd compile 编译不了 PS C:\Users\huangxuejie\Documents\testMap4\testMap2WX> layaair2-cmd compile [18:00:34]  Working directory changed to ~\Documents\testMap4\testMap2WX\.laya [18:00:34]  Using gulpfile ~\Documents\testMap4\testMap2WX\.laya\compile.js C:\Users\huangxuejie\AppData\...

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

89. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 79%]

...); img.src = url; img.style.position ="absolute"; img.style.zIndex = 99999 document.body.appendChild(img); ``` 怎么运行呢?打开谷歌浏览器,随便打开你一个空白网页,F12,把上面的代码粘贴到控制台,然后回车,就看到上面截图的效果。或者新建个htm...

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

90. 微信小游戏调试报错window is not defined [ 78%]

...in 赞同来自: 在game.js开头加入 var window = window || global; var document = document || (window.document = {}); 然后报这个错了,index.js都无法载入。 2019-01-05 0 0 分享 微博 QZONE 微信 Chaplin 赞同来自: demo见附件 wxgy.rar 2019-01-05 0 0 分享 微博 QZONE 微...

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