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

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

261. 文本align="center", 对齐方式无效,无论设置什么值,都是左对齐 [ 76%]

...左对齐 var txtCountDown = new Laya.Text(); txtCountDown.fontSize = 30; this.rankSprite2.txtCountDown = txtCountDown; this.rankSprite2.addChild(txtCountDown); txtCountDown.text = 15; txtCountDown.pivotX = txtCountDown.width/2; txtCountDown.align = "right"; txtCountDown.pos(this.rankSprite2.width /...

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

262. Cannot read property 'toDefault' of undefined报错是什么原因 [ 76%]

...cene", Laya.Scene); function MousePickingScene() { MousePickingScene.super(this); this.camera = new Laya.Camera(0,0.1,100); this.addChild(this.camera); this.camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; this.skyBox = new Laya.SkyBox(); this.camera.sky = this.skyBox; this.skyBox.textureCube = Lay...

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

263. JSON文件加载成功后,怎么解析成Object对象 [ 75%]

...; traceMsg("加载: " + jsonURL); Laya.loader.load(jsonURL, Handler.create(this, readJsonFinish, [jsonURL]), null, Loader.JSON); } private function readJsonFinish(url:String = null):void { traceMsg("readJsonFinish - 加载成功: " + url); // 返回的是 * 类型,要不要先解析成字符串类...

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

264. 分享:简单聊天室 [ 75%]

...</span><br/>"; // 添加超链接跳转 my_html.on(Event.LINK,this,onLink); // 点击btn1 send_btn.on(Event.CLICK,this,onSendClick); // 点击btn2 send_btn1.on(Event.CLICK,this,onSendClick1); // enter键发送默认字体或输入框内字体 Laya.stage.on(Event.KEY_DOWN,this,onKeyDown);...

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

265. [求助]无法使用loader预先加载 [ 75%]

...o.png", "res/mainpage/BtnYes.png" ]; Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading, null, false), Loader.TEXT); Laya.loader.on(Event.ERROR, this, onError);   private function onAssetLoaded(texture:Texture):void{             //console.log("111...

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

266. laya.ui.TextInput_API3.0 [ 75%]

...背景颜色。 Laya.loader.load(["resource/ui/input.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { var textInput:TextInput = new TextInput("这是一个TextInput实例。");//创建一个 TextInput 类的实例对象 textInput 。 textInput...

来源: Laya3.0_api 发布时间: 20231115

267. laya.ui.UIComponent_API3.0 [ 75%]

... showTips1; //带参数的自定义鼠标提示 clip.toolTip = new Handler(this,showTips2, ["clip"]); } private function showTips1():void { _testTips.label.text = "这里是按钮[" + btn1.label + "]"; tip.addChild(_testTips); } private function showTips2(name:String):void { _testTips.label.text = "...

来源: Laya3.0_api 发布时间: 20231115

268. laya.ui.TextArea_API3.0 [ 75%]

...背景颜色。 Laya.loader.load(["resource/ui/input.png"], Handler.create(this, onLoadComplete));//加载资源。 } private function onLoadComplete():void { var textArea:TextArea = new TextArea("这个一个TextArea实例。");//创建一个 TextArea 类的实例对象 textArea 。 textArea.skin =...

来源: Laya3.0_api 发布时间: 20231115

269. laya.ui.Radio_API3.0 [ 75%]

...背景颜色。 Laya.loader.load("resource/ui/button.png", Handler.create(this,onLoadComplete)); } private function onLoadComplete():void { trace("资源加载完成!"); var button:Button = new Button("resource/ui/button.png","label");//创建一个 Button 实例对象 button ,传入它的皮肤sk...

来源: Laya3.0_api 发布时间: 20231115

270. http://layaair.ldc.layabox.com/demo/?Text_Scroll 这个场景中只能有一个吗 我加了第二个 就不滚了 [ 75%]

...*****260 赞同来自: 发现是 第二个txt的 txt.on(Event.MOUSE_DOWN, this, startScrollText); 这个函数监听不到  屏幕外的txt监听不到?  必须移动到屏幕里面才能加这个代码?  移动到里面也再加也不行啊   在编辑器里做过ui 然后 放2个text 一个...

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