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

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

351. 用最新版本的IDE开发,用AS语言开发,用HttpRequest加载图片报错,用JS语言开发却可以加载 [ 57%]

...p:Sprite = new Sprite(); var xhr:HttpRequest = new HttpRequest(); xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.send("res/monkey2.png","","get","arraybuffer"); } private function completeHandler(data:Object):void { //加载完成返回的data是arraybuff...

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

352. 2.x引擎项目升级说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 57%]

...Laya.Script命名函数方式处理输入。例如: this.aNode.on(Laya.Event.CLICK, ()=> { console.log("clicked"); }); class MyScript extends Laya.Script { //脚本事件 onMouseClick(e:Event) { console.log("clicked"); } } aNode.addComponent(MyScript); 以上两种方式是等价的,且在纯...

来源: Laya3.0_文档 发布时间: 20251010

353. image组件加载完成调度事件没反应? [ 57%]

...调度事件没反应? var dialog:Image = new Image(picAy[i]); dialog.on(Event.LOADED,this,onLoaded) private function onLoaded(e:*=null):void{ trace(2) } 这代码有什么问题?不调度onLoaded函数,图片显示正常 2016-10-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...

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

354. 3D场景跳转到2D场景问题 [ 56%]

... } onAwake(){ let btnOnce=this.getChildByName("btnOnce"); btnOnce.on(Laya.Event.CLICK,this,this.onClick); } onClick(e){ this.removeSelf(); let gameScene=new GameScene(); Laya.stage.addChild(gameScene); } } 求大佬教学 2019-09-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

355. 鼠标脚本(ActionScript-3D基础(AS3)-LayaAir3D之鼠标交互) [ 56%]

...(Collider) //当被鼠标点击 override public function onMouseDown(e:Event):void{ //trace("点击到了我box",owner.name); //从父容器销毁我自己 meshsp.removeSelf(); } } ``` > **主类**: ```typescript //给四个猴子添加脚本 staticLayaMonkey.addComponent(MouseScript); layaMonke...

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

356. Laya中的宏编译要怎么用啊 [ 56%]

...lash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADD...

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

357. 提交一个MovieClip的BUG [ 55%]

...te var ani_planet:MovieClip;         private function onBtnClick(e:Event):void {             ani_planet = new MovieClip();             ani_planet.pivotY = ani_planet.pivotX = 350;             ani_planet.x = Laya.stage.width/2;             ani_p...

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

358. Sprite-切换纹理 [ 55%]

....width / 2, Laya.stage.height / 2); this.switchTexture(); this.ape.on(Laya.Event.CLICK, this, this.switchTexture); } switchTexture() { let monkey = (this.flag = !this.flag) ? monkey1Res : monkey2Res; this.ape.graphics.clear(); this.ape.graphics.drawTexture(monkey, 0, 0); this.ape.size(monkey.width, ...

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

359. list ,增加item ,我想在末尾增加,但是每次都给我翻倍的增加,如何解决 [ 55%]

..._jiesan.png"); button.pos(300, 0); this.roombg.addChild(button); button.on(Event.MOUSE_DOWN, this, function (e) { list.addItem(1); }); function Item() { Item.__super.call(this); this.size(416, 270); this.text = new Text(); this.text.fontSize = 20; this.text.pos(12, 5); this.text.color = "#FF00FF"; t...

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

360. laya.ui.ComboBox [ 55%]

...ll Classes | Index | Frames No Frames ComboBoxProperties | Methods | Events Packagelaya.uiClasspublic class ComboBoxInheritanceComboBox Component Sprite Node EventDispatcher Object ComboBox 组件包含一个下拉列表,用户可以从该列表中选择单个值。 Public Properties Hide I...

来源: laya_api 发布时间: 20170929