大约有 85 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0052 秒)
... g_stat_heiht); 加入下列代码设置窗口位置和拉伸效果。Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.screenMode = Laya.Stage.SCREEN_HORIZONTAL; Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; 2.设置标题和输出信息 网上...
来源: Laya_社区 发布时间: 20160623
...rite = new Laya.Sprite(); a.graphics.drawCircle(0, 0, 50, "#ff0000"); Laya.stage.addChild(a); a.size(100, 100); a.pos(200, 200); a.mouseEnabled = true; a.mouseThrough = true; a.on(Laya.Event.MOUSE_DOWN, null, function (e: Laya.Event): void { console.log("touch a"); } 因为需要将mouseThroug...
来源: Laya_社区 发布时间: 20161109
...地图放大3倍 this.tMap.scale = 3; this.MapX = 0; this.MapY = 0; Laya.stage.on(Laya.Event.RESIZE,this,resize); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP,this,mouseUp); resize(); } /** * 移动地图视口 */ function mouseMove(){ var moveX = this.MapX ...
来源: Laya2.0_文档 发布时间: 20210715
... tiledMap.createMap("../res/dt.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null); 调用后报错TypeError: Cannot read property 'split' of undefined at TiledMap.__proto.mergePath (file:///C:/Users/Administrator/Documents/myLaya/Hello/bin/libs/laya.tiledmap.j...
来源: Laya_社区 发布时间: 20181026
...ndEvents(); // 监听全局事件 Laya.stage.on("DIALOG_SHOW", this, this.disable); Laya.stage.on("DIALOG_HIDE", this, this.enable); } onDestroy() { // 移除事件监听 Laya.stage.off("DIALOG_SHOW", this, this.di...
来源: Laya_社区 发布时间: 20251125
...wPortPivotByScale(0,0); //将原地图放大3倍 this.tMap.scale = 3; Laya.stage.on(Laya.Event.RESIZE,this,this.resize); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); this.resize(); } /** * 移动地图视口 */ private mouseMove(...
来源: Laya2.0_文档 发布时间: 20210715
...loadImage方法为什么不触发complete? var logo = new Sprite(); Laya.stage.addChild(logo); logo.loadImage("img/load_logo.png", 0, 0, 0, 0, Handler.create(this, function(){ trace("complete!!"); })); 我在laya1.0这么写,触发complete没毛病,为什么到了2.0这个complete不触发?...
来源: Laya_社区 发布时间: 20181010
...etViewPortPivotByScale(0,0); //将原地图放大3倍 tMap.scale = 3; Laya.stage.on(Event.RESIZE,this, this.resize); Laya.stage.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); resize(); } /** * 移动地图视口 */ private function mouseMove():void { v...
来源: Laya2.0_文档 发布时间: 20210714
...ss HTTP_URLRequest extends Sprite { public function HTTP_URLRequest() { if(stage) { init(); } else { this.addEventListener(Event.ADDED_TO_STAGE,init); } } private function init(e:Event=null):void { //第一步:加载数据:创建URLLoader对象 var urlLoader:URLLoader=new URLLoader(); //第二...
来源: Laya_社区 发布时间: 20151217
...理 public function Demo() { Laya.init(800,1000,WebGL); Stat.show(); Laya.stage.bgColor="#EEFFCC"; //预加载图集 Laya.loader.load("res/atlas/bag.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { sp=new Sprite(); Laya.stage.addChild(sp); //每隔0.05秒...
来源: Laya_社区 发布时间: 20161107