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

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

91. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 71%]

... = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Event; import SoundManager = Laya.SoundManager; import Browser = Laya.Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export default class Test_11_Sound {  //声明一个信息文本 private t...

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

92. 点击区域问题 [ 71%]

...000"); sp.hitArea = new laya.maths.Rectangle(-50,-100,100,100); sp.on(laya.events.Event.CLICK,this,this.spHandler); function spHandler() {     sp.graphics.clear();     var rc:number = Math.floor(Math.random()*0xffffff);     sp.graphics.drawRect(-50,-100,100,100,"#"+rc); } 这样多包几...

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

93. canvas下资源清理的问题 [ 71%]

...同来自: package {     import laya.display.Stage;     import laya.events.Event;     import laya.net.Loader;     import laya.ui.Button;     import laya.utils.Handler;     import laya.utils.Stat;          import ui.TaskUI;          import view.TestView;          p...

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

94. Sprite-屏幕截图 [ 71%]

...ar btn = new Laya.Button(skin,name); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,this,cb); btn.size(147,55); btn.name = name; btn.right = 10; btn.top = index * (btn.height + 10); return btn; } onLoaded(){ for (let index = 0; index = ["res/button.png", "res/button.png", "res/button.png"]; priva...

来源: Laya2.0_示例 发布时间: 20240929

95. 3D射线穿透UI问题 [ 70%]

... "切换动作")) as Laya.Button; button.name = "abc"; Laya.Button.on(Laya.Event.CLICK, this, function:void{ 具体实现  });     在另一个方法里面 Laya.stage.on(Laya.Event.MOUSE_UP, this, function(evt:Laya.Event):void{     console.log("aaaaa = " + evt.tager.name);  //这里名字是...

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

96. 如何在按钮监听中获取按钮本身 [ 70%]

...有的AnimationClip呢? 怎样获取浏览器地址传过来的GET参数 Event.MOUSE_WHEEL 如何获取鼠标滚轮是放大开始缩小 分享:LayaAir下如何获取图集下的小图资源? 怎么获取对象的坐标 List滑动条会引起单元格上的按钮点击后多次触发点击事...

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

97. 点击list的时候触发的e.target永远是被点击的item? [ 70%]

...Button; var my_clip:Clip=cell.getChildByName("my_clip") as Clip; my_btn.on(Event.CLICK,this,onBtnClick,["my_btn"]); my_clip.on(Event.CLICK,this,onClipClick,["my_clip"]); } private function onBtnClick(name:String):void { // TODO Auto Generated method stub trace(name); } private function onClipClick(n...

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

98. 获取的ui页面里下on事件无法触发 [ 69%]

...ameStartView = function () { GameStartView.super(this); this.Start.on(Laya.Event.CLICK, this, this.open); console.log(this.Start); GameStartView.prototype.open = function(){ console.log("Open is ok"); } }; Laya.class(GameStartView,"GameStartView", GameStartUI); 输出:Button {toggle: false, _bitma...

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

99. cavans上触发不了input的点击事件 [ 69%]

...添加一个sprite,给sprite添加一个点击事件,this.hitimg.on(Laya.Event.CLICK,this,this.onStart); onStart: _proto.onStart = function(){ console.log(111111122222); $("#fileInput").trigger('click'); } 可以打印数字,但是触发不了input控件。 <input id="fileInput" type="fil...

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

100. 全屏请求问题!!!求救啊!!求救啊!! [ 69%]

...问题!!!求救啊!!求救啊!! this.fullScreen_btn.on(Laya.Event.CLICK, this, this.onFullScreen, null); _proto.onFullScreen = function () { toggleFullscreen(); };       function launchIntoFullscreen(element) { var element = document.documentElement; if (element.requestFullscreen)...

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