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

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

191. 文字在框内滑动、滚动文本 [ 80%]

...lor="#ffffff";     Laya.stage.addChild(this.txt);     this.txt.on(Laya.Event.MOUSE_DOWN, this, startScrollText); } function startScrollText(){     this.prevX = this.txt.mouseX;     this.prevY = this.txt.mouseY;     Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.scrollText);     Laya.sta...

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

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

...;this.txt.color = "#ffffff";Laya.stage.addChild(this.txt);this.txt.on(Laya.Event.MOUSE_DOWN,this,startScrollText);}/*开始滚动文本*/function startScrollText(){this.prevX = this.txt.mouseX;this.prevY = this.txt.mouseY;Laya.stage.on(Laya.Event.MOUSE_MOVE,this,scrollText);Laya.stage.on(Laya.Event....

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

193. spine动画,微信模拟器正常,真机动画图片颠倒!!!引擎大bug!!! [ 80%]

...如下:   以下是代码: protected onEnter(){ this.img_sample.on(Laya.Event.CLICK, this, this.onImgClick); Laya.loader.load("res/atlas/comp/skeleton.atlas"); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(L...

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

194. 超出文本区域的处理&滚动文本(ActionScript-LayaAir基础篇(AS3)-文本) [ 79%]

...有效果。 ```typescript package { import laya.display.Text; import laya.events.Event; import laya.utils.Browser; import laya.webgl.WebGL; public class Text_Scroll { private var txt:Text; private var prevX:Number = 0; private var prevY:Number = 0; public function Text_Scroll() { // 不支持WebGL...

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

195. 输入设备-摇一摇 [ 79%]

...t Shake = Laya.Shake; Shake.instance.start(5, 500); Shake.instance.on(Laya.Event.CHANGE, this, this.onShake); console.text = '开始接收设备摇动\n'; } onShake() { const Shake = Laya.Shake; shakeCount++; console.text += "设备摇晃了" + shakeCount + "次\n"; if (shakeCount >= 3) { Shake.inst...

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

196. socket通讯返回数据 [ 79%]

...接 this.socket.connectByUrl("ws://localhost:8899"); this.socket.on(Laya.Event.OPEN, this, this.openHandler); this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler); this.socket.on(Laya.Event.CLOSE, this, this.closeHandler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler); // this.s...

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

197. laya.resource.VideoTexture_API3.0 [ 79%]

...tSource _removeReference _setCPUMemory _setCreateURL _setGPUMemory destroy event gpuCompressFormat hasListener isCreateFromURL off offAll offAllCaller on once videoPause videoPlay destroyUnusedResources Constructors constructor new VideoTexture(): VideoTexture Overrides BaseTexture.constructor Defin...

来源: Laya3.0_api 发布时间: 20231102

198. 多个button如何区分 [ 79%]

... 通过 for 循环 加入多个button 添加事件 this.emojiBut1.on(Laya.Event.CLICK,this,this.onEmojiBut1Click); 多个button 如何区分 点击的哪一个button  可以设置tag吗 或者通过监听事件透传?   附件 : --> 2017-04-25 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

199. 模拟鼠标事件 [ 79%]

...: 手动调一下对应的事件即可。例如: package { import laya.events.Event; public class Main { public function Main() { //初始化引擎 Laya.init(600,400); //手动调stage的click事件 this.onClick(); //给stage监听点击事件 Laya.stage.on(Event.CLICK,this,onClick); } private fun...

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

200. DOM元素-视频 [ 79%]

...a设置Video的位置,对齐的位置和refence重合 Laya.stage.on(Laya.Event.RESIZE, this, Laya.Utils.fitDOMElementInArea, [videoElement, reference, 0, 0, reference.width, reference.height]);class DOM_Video { constructor() { Laya.init(800, 600); Laya.stage.bgColor = "#FFFFFF"; Laya.stage.alignH ...

来源: Laya_示例 发布时间: 20251130