大约有 585 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0050 秒)
Laya_社区(389) Laya2.0_api(59) laya_api(55) Laya2.0_文档(29) Laya3.0_文档(21) Laya2.0_示例(16) Laya_示例(13) Laya3.0_api(3)
...Canvas命令按钮 var btnDraw:Sprite=CreateBtn(100,400); btnDraw.on(Event.CLICK,this,onClickBtnDraw); } //创建按钮 private function CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite(); btn.graphics.drawRect(0,0,200,50,"#FF0000"); btn.pos(100,400); var text:Text=new Text(); text.text="...
来源: Laya_社区 发布时间: 20170822
...eoDom { htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loa...
来源: Laya_社区 发布时间: 20240305
...i.playbackRate(10); //侦听点击,换动画 this.spineBtn.on(Laya.Event.CLICK, this, this.changeAni); }第二,你通过Laya.timer.scale设置比较大的值,受限制是因为引擎中作了一些优化保护,让动画不至于播放过快。如果你想自己控制速度,我们也可以...
来源: Laya_社区 发布时间: 20241217
...or() { trace("error"); } function parseComplete() { Laya.stage.on(Event.CLICK, this, () => { mArmature = Laya.Pool.getItemByClass('Skeleton', Laya.Skeleton); mArmature.init(mFactory, 1); mArmature.x = mStartX; mArmature.y = mStartY; mArmature.scale(0.5, 0.5); mArmature.on(Eve...
来源: Laya_社区 发布时间: 20181120
...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); 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台上,可以用手机扫...
来源: Laya3.0_文档 发布时间: 20251010
...FFFFFF,#FFFFFF,#FFFFFF"; this.controller.size(84, 30); this.controller.on('click', this, this.onClipSwitchState); this.controller.x = (Laya.stage.width - this.controller.width) / 2; this.controller.y = (Laya.stage.height - this.controller.height) / 2 + 110; Laya.stage.addChild(this.controller); } pr...
来源: Laya2.0_文档 发布时间: 20210714
... extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3.3 关联场景 设置好弹窗之后,需要用代码将Dialog与所需要用到该Dialog的场景管关联起来。回到初始场景Scene,在Scene2D的属性设置面板...
来源: Laya3.0_文档 发布时间: 20251024
...载分包和资源 ``` onConfigLoaded(): void { Laya.stage.on(Laya.Event.CLICK, this, this.toPage2) } toPage2(): void { my.redirectTo({ url: "/subpackage1/page2/index", success: function () { console.log("success") }, fail: function (err) { console.log("2222", err) } }) } ``` 注意:在加载资...
来源: Laya2.0_文档 发布时间: 20210715
...e.width / 2; this.ball.y = Laya.stage.height / 2; Laya.stage.on(Laya.Event.CLICK,this,this.onClick); Laya.timer.frameLoop(1,this,this.onEnterFrame); } private onEnterFrame():void{ if(this.points.length>0){ if(this.i<this.points.length){ this.ball.x = this.points[this.i].x; this.ball.y = this.p...
来源: Laya_社区 发布时间: 20171108
...r url = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); function clickHandler(){ var url = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加...
来源: Laya2.0_文档 发布时间: 20210714