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

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

2231. 当使用Image作为一个对象的遮罩时,设置Image的ScaleX为0时遮罩失效! [ 64%]

...AS}],Laya.Handler.create(this,this.loaded,null)); } private loaded():void{ var img:Laya.Image = new Laya.Image(); img.skin = "comp/img_pro.png"; Laya.stage.addChild(img); var imgMask:Laya.Image = new Laya.Image(); imgMask.skin = img.skin; imgMask.scaleX = 0; // 无效 // imgMask.scaleX = 1 // 有效...

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

2232. 为什么pannel里显示两张同样的图片显示不出来,只能显示一张 [ 64%]

...anel.vScrollBarSkin = "comp/vscroll.png"; Laya.stage.addChild(this.panel); var img:Laya.Image = new Laya.Image(); img.skin = "res/GameBG2.jpg" this.panel.addChild(img) var img1:Laya.Image = new Laya.Image(); img1.y = 1136; img1.skin = "res/GameBG2.jpg"; this.panel.addChild(img1) } } 两张同样的...

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

2233. 救命!canvas定位后 点击区域偏移,求大大们解答 [ 64%]

...在去除canvas自带的绝对定位,但也会导致点击区域偏移 var LayaCanvas = document.getElementsByTagName("canvas")[0] document.getElementById("aaa").appendChild(LayaCanvas); 3.在这里 http://ask.layabox.com/question/4533 问过,使用Laya.Render._mainCanvas.source.style来设置ca...

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

2234. laya.d3.physics.PhysicsSimulation [ 64%]

...isionDetection(value:Boolean):voiddisableSimulationproperty public static var disableSimulation:Boolean = falsefixedTimeStepproperty public var fixedTimeStep:Number物理模拟器帧的间隔时间:通过减少fixedTimeStep可增加模拟精度,默认是1.0 / 60.0。gravityproperty gravity:Vect...

来源: Laya2.0_api 发布时间: 20190513

2235. 问一下tween的一些参数怎么设置 [ 64%]

...utils.Handler; import laya.utils.Tween; public class LayaAirDemo { private var sp:Sprite; private var num:int; public function LayaAirDemo() { Laya.init(550,400); sp=new Sprite(); sp.graphics.drawCircle(0,0,50,"#00FFFF"); Laya.stage.addChild(sp); sp.pos(100,100); Tween.to(sp,{x:500},1000,Ease.backIn...

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

2236. 同一个Animation,创建多个实例只能显示一个(测试项目已上传) [ 64%]

...(跟官方微信飞机结构类似)  问题截图:   代码:for (var i:int=0;i<10;i++){ var p:wheel=Pool.getItemByClass("wheel", wheel); p.pos(i*90+100,200); p.init(); roleLayer.addChild(p) } /////////////wheelas.as public function wheel(){ this.graphics.drawCi...

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

2237. laya.display.Text [ 64%]

...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var sp:Sprite = new Sprite();//创建精灵 sp.graphics.drawTexture(htmlCanvas.getTexture());//把截图绘制到精灵上 Laya.st...

来源: Laya2.0_api 发布时间: 20190513

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

...his, this.finishScrollText);}/* 鼠标滚动文本 */function scrollText(){var nowX = this.txt.mouseX;var nowY = this.txt.mouseY;this.txt.scrollX += this.prevX - nowX;this.txt.scrollY += this.prevY - nowY;this.prevX = nowX;this.prevY = nowY;} 2018-09-06 0 0 分享 微博 QZONE 微信 为什么被折...

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

2239. 绘制直线与折线(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 64%]

...   public class Sprite_DrawShapes     {         private var sp:Sprite;                   public function Sprite_DrawShapes()         {             Laya.init(500, 300, WebGL);             drawSomething();         }    ...

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

2240. HTMLIframeElement报错 [ 64%]

HTMLIframeElement报错 我用 var p:HTMLIframeElement = new HTMLIframeElement(); Laya.stage.addChild(p); p.href = "test.html"; p.y = 200; 一执行就报错是为什么啊?错误如下: Utils.parseXMLFromString=function(value){ var rst; value=value.replace(/>\s+</g,'><'); rst=(new ...

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