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

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

121. 改变位置后,点击区域不生效了 [ 67%]

...点击区域不生效了 package { import laya.display.Sprite; import laya.events.Event; import laya.renders.Render; public class MoveTest { public function MoveTest() { Laya.init(600,600); var sp:Sprite = new Sprite(); sp.autoSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK...

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

122. LAYAAIR加载SWF无线循环 [ 67%]

...cheight:"+mc.height);                      //  mc.on(Event.LOADED,this,onComp);         //  mc.on(Event.COMPLETE,this,onEnd);         //  mc.x = (Laya.stage.width ) / 2;         //  mc.y = (Laya.stage.height) / 2;             Laya.stage...

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

123. 新手引导在ios浏览器表现异常 [ 67%]

...ode = Laya.Stage.SCREEN_NONE;             Laya.stage.on(Laya.Event.RESIZE, this, this.windowResized);         }         windowResized(){             let sp = new Laya.Sprite();             sp.graphics.drawRect(0,0,Laya.stage.width,Laya.stag...

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

124. Dialog中编辑的动画如何控制? [ 66%]

...链接 提交 1 个回复 cuixueying 赞同来自: function TestUI() { var Event = laya.events.Event; TestUI.super(this); this.ani1.play(15);//play的第一个参数是从第几帧开始播放 Laya.stage.on(Laya.Event.CLICK,this,onClick); } Laya.class(TestUI, "TestUI", TestPageUI); function onClick(...

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

125. 绘制形状时事件不触发 [ 66%]

...e.graphics.drawCircle(x, y, r1, color1, color1, 0);     function on_down(event) {         console.log("_____ kbRing2\n");     } } function laya_test() {     Laya.init(Laya.Browser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL);     var ring = new myRing(600, 300, 18, "#087729", 40,...

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

126. 龙骨skeleton鼠标点击区域的设置 [ 66%]

...gle=new Rectangle(-420,-680,420,680); mArmature.hitArea=rect; mArmature.on(Event.CLICK,this,onClick);    2016-11-22 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: 于一个点为中心播放 :      this.mArmature = this.mFactory.buildArmature(0);         this.mArmatureSpr.addChild(t...

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

127. 循环监听按钮,如何进行传参和接受参数 [ 66%]

...' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         let b = event.currentTarget as Laya.Image; console.log('onClickLevel > ' + b.skin); this.removeSelf(); Lay...

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

128. 分享:IDE使用SWF动画的销毁与反复创建 [ 66%]

...:IDE使用SWF动画的销毁与反复创建 package {     import laya.events.Event;     import laya.net.Loader;     import laya.utils.Handler;     import view.TestView;          public class LayaUISample {                  public function LayaUISample() {        ...

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

129. 分享:截屏! [ 66%]

...截屏! package {     import laya.display.Sprite;     import laya.events.Event;     import laya.resource.HTMLCanvas;     import laya.resource.Texture;     import laya.utils.Browser;     import laya.webgl.WebGL;          public class LayaAirDemo {         private var s...

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

130. 为什么hitTestPoint始终是false? [ 66%]

.../bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console.log(this.s.hitTestPoint(e.stageX, e.stageY)); } } 很简单的代码,不知道什么hitTestPoint始终得到的是false.我打印出s的宽...

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