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

大约有 243 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0071 秒)

1. HTMLIframeElement 使用出错?请大神指点 [ 100%]

... = Laya.HTMLIframeElement; var iHtml = new HTMLIframeElement(); Laya.stage.addChild(iHtml); iHtml.href="http://www.baidu.com"; 一启动运行就现以下错误  Error processing "variables": TypeError: Cannot read property 'length' of undefined at trimProperty (d:\Program Files\LayaIDE\resources\...

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

2. 不带格式后缀的图片无法成功加载 [ 95%]

...odee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y = 350 Laya.stage.addChild(nodee) }));上面这个图片无法正常显示,打印 texture 的宽是 undefined,如果是带后缀的图片,比如.jpg就可以正常展示图片。 附件 : --> ImageDemo.zip 2021-10-26 添加评论 免费...

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

3. laya.ui.Tree_API3.0 [ 95%]

... tree 的宽度。 tree.height = 100;//设置 tree 的高度。 Laya.stage.addChild(tree);//将 tree 添加到显示列表。 } } } import laya.ui.Box; import laya.ui.Clip; import laya.ui.Label; class Item extends Box { public function Item() { this.name = "render"; this.right = 0; this.left = 0; va...

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

4. 富文本:LayaAir下 HtmlDivElement的使用汇总 [ 95%]

...ayaBox</span><span>欢迎你的加入</span>" Laya.stage.addChild(div);2、获取Html文本的实际内容、获取html文本的实际宽高(contextWidth、contextHeight) 示例如下:var htmlDiv:HTMLDivElement=new HTMLDivElement(); var html:String = "<span color='#e3d26a'...

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

5. laya.display.Sprite_API3.0 [ 93%]

...otY = 0;//设置 sprite 对象的垂直方法轴心点坐标。 Laya.stage.addChild(sprite);//将此 sprite 对象添加到显示列表。 sprite.on(Event.CLICK, this, onClickSprite);//给 sprite 对象添加点击事件侦听。 shape = new Sprite();//创建一个 Sprite 类的实例对象 sprite ...

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

6. laya.ui.Button_API3.0 [ 93%]

...ickButton,[button]);//设置 button 的点击事件处理器。 Laya.stage.addChild(button);//将此 button 对象添加到显示列表。 } private function onClickButton(button:Button):void { trace("按钮button被点击了!"); } } } example Laya.init(640, 800);//设置游戏画布宽高、渲...

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

7. laya.ui.Image_API3.0 [ 93%]

...象的宽度。 bg.height = 250;//设置 bg 对象的高度。 Laya.stage.addChild(bg);//将此 bg 对象添加到显示列表。 var image:Image = new Image("resource/ui/image.png");//创建一个 Image 类的实例对象 image ,并传入它的皮肤。 image.x = 100;//设置 image 对象的属性 ...

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

8. laya.ui.CheckBox_API3.0 [ 92%]

...lick, [checkBox]);//设置 checkBox 的点击事件处理器。 Laya.stage.addChild(checkBox);//将此 checkBox 对象添加到显示列表。 } private function onClick(checkBox:CheckBox):void { trace("输出选中状态: checkBox.selected = " + checkBox.selected); } } } example Laya.init(640, 800)...

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

9. laya.ui.Label_API3.0 [ 92%]

...bel 的宽度。 label.height = 200;//设置 label 的高度。 Laya.stage.addChild(label);//将 label 添加到显示列表。 var passwordLabel:Label = new Label("请原谅我,我不想被人看到我心里话。");//创建一个 Label 类的实例对象 passwordLabel 。 passwordLabel.asPasswor...

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

10. laya.ui.List_API3.0 [ 91%]

...s, onSelect);//设置 list 改变选择项执行的处理器。 Laya.stage.addChild(list);//将 list 添加到显示列表。 } private function onSelect(index:int):void { trace("当前选择的项目索引: index= ", index); } } } import laya.ui.Box; import laya.ui.Label; class Item extends Box {...

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