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

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

1. 显示与切换图片(ActionScript-LayaAir基础篇(AS3)-位图) [ 100%]

...ya.display.Sprite; public class Main { public function Main() { //初始化舞台 Laya.init(1334,750); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" var img:Sprite = new Sprite(); //加载显示图片,坐标位于100,50 img.loadImage("res/img/monkey1.png"); //添加到舞台 Laya.stage.ad...

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

2. FlashDevelop中第一个程序“Hello Layabox”(ActionScript-LayaAir基础篇(AS3)-快速上手) [ 93%]

...(9) ​ **步骤二**:将一个“Hello Layabox”的文本添加到舞台,代码如下: ```java package {  import laya.display.Text;     /** @author Charley */     public class HelloLayabox {   public function HelloLayabox() {    //创建舞台,默认背景色是...

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

3. 设置遮罩(ActionScript-LayaAir基础篇(AS3)-位图) [ 92%]

... var img:Sprite; public function MaskDemo() { Laya.init(1136,640); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handl...

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

4. Clip属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 90%]

...ge = new Image(bgSkin); //设置图片大小 bg.size(224, 302); //位置居舞台中间 bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height -bg.height >> 1); //加载到舞台 Laya.stage.addChild(bg); } /***创建计数器切片***/ private function createCounter():void { //实例化计数器...

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

5. 屏幕适配的缩放模式详解(ActionScript-2D基础篇(AS3)-屏幕适配) [ 89%]

...t来获取设备屏幕屏幕的物理宽高。 ### 示例代码中所用的背景图片: [loadingBg.jpg](http://ldc.layabox.com/uploadfile/file/20170223/1487816895380055.jpg)(点击打开或另存`1136×640`像素背景原图) ### 一、exactfit模式 ​ exactfit模式是一种不考虑内容的...

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

6. 屏幕适配的缩放模式详解(TypeScript-2D基础篇(TS)-屏幕适配) [ 89%]

...t来获取设备屏幕屏幕的物理宽高。 ### 示例代码中所用的背景图片: [loadingBg.jpg](http://ldc.layabox.com/uploadfile/file/20170223/1487816895380055.jpg)(点击打开或另存`1136×640`像素背景原图) ### 一、exactfit模式 ​ exactfit模式是一种不考虑内容的...

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

7. 设置遮罩(JavaScript-LayaAir基础篇(JS)-位图) [ 88%]

...Laya.Handler; var Res; var img; (function() { Laya.init(1136,640); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" //资源路径 Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(Res,Handl...

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

8. 设置遮罩(TypeScript-LayaAir基础篇(TS)-位图) [ 88%]

...ing; private img:Laya.Sprite; constructor() { Laya.init(1336,640); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //资源路径 this.Res = "res/img/monkey1.png"; //先加载图片资源,在图片资源加载成功后,通过回调方法绘制图片并添加到舞台 Laya.loader.load(thi...

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

9. VScrollBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 82%]

...回调 vScrollBar.changeHandler = new Handler(this, onChange); //加载到舞台 Laya.stage.addChild(vScrollBar); //创建提示信息 createPromptText(vScrollBar) } /***创建提示信息***/ private function createPromptText(scrollBar:ScrollBar):void { //实例化提示信息 promptText=new Text()...

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

10. HScrollBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 82%]

...回调 hScrollBar.changeHandler = new Handler(this, onChange); //加载到舞台 Laya.stage.addChild(hScrollBar); //创建提示信息 createPromptText(hScrollBar) } /***创建提示信息***/ private function createPromptText(scrollBar:ScrollBar):void { //实例化提示信息 promptText=new Text()...

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