大约有 569 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0056 秒)
Laya_社区(381) Laya2.0_api(59) laya_api(55) Laya2.0_文档(29) Laya2.0_示例(16) Laya3.0_文档(13) Laya_示例(13) Laya3.0_api(3)
...cript Laya.timer.frameLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); function dispose() { Laya.timer.clear(this, animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的做法** 在...
来源: Laya2.0_文档 发布时间: 20210715
...tring = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler():void{ var url:string = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,...
来源: Laya2.0_文档 发布时间: 20210715
...pr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.timer.frameLoop(10,this,refresh); } private function refresh():void { Ico...
来源: Laya_社区 发布时间: 20180113
...pixelRatio / 2, Laya.stage.height - 50 * Browser.pixelRatio); btn.on(Event.CLICK, _this, onclick); Laya.stage.addChild(btn); Laya.stage.on(Event.RESIZE, null, function():void { btn.pos(Laya.stage.width / 2 - btn.width * Browser.pixelRatio / 2, Laya.stage.height - 50 * Browser.pixelRatio); }); })); }...
来源: Laya_社区 发布时间: 20170209
...ew LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方式 查看效果不同 loadPage.openScene('page2.scene', this.getUserInfo, true, [1, 2, 3]) // loadPage.openScene2('page2.scene', this.getUserInfo, true, [1, 2, 3]) }) } /** ...
来源: Laya_社区 发布时间: 20181124
... Laya.timer.frameLoop(1, this, this.animateFrameRateBased); Laya.stage.on("click", this, this.dispose); dispose() { Laya.timer.clear(this, this.animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的做法** 在...
来源: Laya2.0_文档 发布时间: 20210714
...iew extends ui.LoginUI { constructor() { super(); this.login.on(Laya.Event.CLICK, this, this.Loginyim); this.joinroom.on(Laya.Event.CLICK, this, this.JoinRoom); this.RecordAudio.on(Laya.Event.MOUSE_DOWN, this, this.StartRecordAudio); this.RecordAudio.on(Laya.Event.MOUSE_UP, this, this.StopRecordAudi...
来源: Laya_社区 发布时间: 20170722
...rt class NewScript extends Laya.Script { constructor() { super(); } onMouseClick(evt: Laya.Event): void { // 尝试获取当前位置 Laya.Geolocation.getCurrentPosition( Laya.Handler.create(this, this.onSuccess), Laya.Handler.create(this, this.onError) ); console.log("click"); } // 成功获取位...
来源: Laya3.0_文档 发布时间: 20230725
...的垂直方向中心线的距离(以像素为单位)。 Component clickHandler : Handler 对象的点击事件处理器函数(无默认参数)。 Button comXml : Object XML 数据。 Component customRenderEnable : Boolean[write-only] 设置是否开启自定义渲染,只有开启自...
来源: laya_api 发布时间: 20170929
...ild(sprite);//将此 sprite 对象添加到显示列表。 sprite.on(Event.CLICK, this, onClickSprite);//给 sprite 对象添加点击事件侦听。 shape = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。 shape.graphics.drawRect(0, 0, 100, 100, "#ccff00", "#ff0000", 2);//绘制一...
来源: Laya3.0_api 发布时间: 20231115