大约有 1,232 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0046 秒)
Laya_社区(702) Laya_示例(137) Laya2.0_文档(123) Laya2.0_示例(116) Laya3.0_文档(75) Laya3.0_api(39) laya_api(29) Laya2.0_api(11)
...面都能正常显示红色色块,安卓机就只能看到黑色色块了private function test():void { var sp1:Sprite = new Sprite(); sp1.graphics.drawRect(0,0,300,200,"#ff0000"); var htmlCanvas:HTMLCanvas = sp1.drawToCanvas(300,200,0,0); Laya.timer.once(1000,this,function():void{ var texture:Tex...
来源: Laya_社区 发布时间: 20181121
...自: Laya.stage.on(Event.BLUR,this,Onblur); private function Onblur():void{ alert("sdfsdf"); } 试一下吧 可以的 2018-01-06 0 0 分享 微博 QZONE 微信 qq747899378 赞同来自: 我说的是物理home键,不是焦点 201...
来源: Laya_社区 发布时间: 20180106
...; import laya.utils.Stat; import laya.webgl.WebGL; public class HtmlDemo { private static var sp:Sprite; public function HtmlDemo() { Laya.init(800, 480,WebGL); Stat.show(); sp=new Sprite(); sp.loadImage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function on...
来源: Laya_社区 发布时间: 20160905
...n(Event.CLICK,this, onsp); Laya.stage.addChild(sp); } private function onsp(e:Event){ console.log("监听到按钮"+e.target); console.log((e.target.getChildAt(0) as Sprite).name); console.log(e.target.name) } ...
来源: Laya_社区 发布时间: 20170330
...("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("res/atlas/comp.json"); }JSON的解析和AS3的是一样的 2016-10-27 2 0 分享 微博 QZONE 微信 bobofuns - 我是阿布大人。 赞同来自: 在...
来源: Laya_社区 发布时间: 20161027
...,但是不起作用,运行后是黑屏,我的测试代码如下: private var chatLayer:Sprite; /** 游戏入口 */ public function Main() { //初始化引擎,建议增加WebGl模式 Laya.init(1280, 720, WebGL); //加载游戏页面资源(如果界面资源太多太大[超过50k],建议开...
来源: Laya_社区 发布时间: 20180401
...3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ... this.model = animator.owner as Laya.Sp...
来源: Laya3.0_文档 发布时间: 20251010
...击事件: this.btnHome.on(Laya.Event.CLICK, this, this.homeClick); private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 的 相关问题 有什么容...
来源: Laya_社区 发布时间: 20180901
....loader.load("aaa.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var js:JSON=Laya.loader.getRes("aaa.json"); trace(js); }2、你如果是想使用file读取文件的方式,这个目前layaAir下不支持,需要你借助原生file的操作来实现! ...
来源: Laya_社区 发布时间: 20170620
...r(); on(LayaSample.event, this, onhandler); trace("侦听函数开始"); } private function onhandler(e:*):void { trace("侦听函数收到消息"); } } } DisEvent类: package { import laya.display.Sprite; public class DisEvent extends Sprite { public function DisEvent() { super(); event(LayaSampl...
来源: Laya_社区 发布时间: 20170604