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

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

591. ProgressBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 73%]

...,5,5"; progressBar.changeHandler = new Handler(this, onChange); Laya.stage.addChild(progressBar); Laya.timer.loop(100, this, changeValue); } function changeValue() { if (progressBar.value >= 1) progressBar.value = 0; progressBar.value += 0.05; } function onChange(value) { console.log("进度:" + M...

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

592. 文本基础样式(ActionScript-LayaAir基础篇(AS3)-文本) [ 73%]

... = new Text(); txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中 白色的hello_world。 接着我们给我们的文本添加一些其他的字体样式,粗体、斜体、字体大...

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

593. Laya.stage.on(Laya.Event.DISPLAY,this,this.ddddd); 无法监听到。 [ 73%]

...function TestAir() { Laya.init(600,400); var aaa:AAA=new AAA(); Laya.stage.addChild(aaa); } } }显示对象类 package { import laya.display.Sprite; import laya.events.Event; public class AAA extends Sprite { public function AAA() { super(); this.on(Event.DISPLAY,this,onDisplay); } private function ...

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

594. 图集动画(JavaScript-LayaAir基础篇(JS)-动画基础) [ 72%]

....create(this,onLoaded)); function onLoaded(){ //添加到舞台 Laya.stage.addChild(this.roleAni); } ``` 运行代码,如图5所示。动画已加载到舞台上,默认是未播放状态的。 ![图5](img/5.png) (图5) #### 2.3 播放图集动画 图集动画使用loadAtlas()方法加载后,...

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

595. 扇形遮罩问题。 [ 72%]

...形设置扇形遮罩 代码: var sp:Sprite = new Sprite(); Laya.stage.addChild(sp); sp.alpha = 0.8; sp.graphics.drawRect(50,50,50,50,"#ff0000"); var sp1:Sprite = new Sprite(); sp1.alpha = 0.5; //Laya.stage.addChild(sp1); //画扇形 当这个扇形画的角度是 0-360度时 舞台上红色矩形...

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

596. 请问为什么修改stage.bgColor为白色在电脑上可以,但是在ios上背景色是黑色的? [ 72%]

...一个UI的一个sceneColor为白色然后F12发布,为什么 Laya.stage.addChild不生效,得设置bgColor设置为白色才生效? thekingreturn • 2018-03-19 11:32 也就是说在IDE面板设置的不生效,得用代码再设置一遍

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

597. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 72%]

...0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e.nativeEvent.offsetX ); console.log( e.nativeEvent.offsetY ); }   我设置了一个矩形,并给这个...

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

598. LayaAir下TTF字体的使用方式? [ 72%]

...init(550,400); var sp:Image=new Image(); sp.loadImage("2.png"); Laya.stage.addChild(sp); var text:Text=new Text(); text.fontSize=40; text.color="#FF00FF"; text.text="哈哈哈哈哈哈哈哈哈哈哈哈哈哈"; text.font="hu" text.pos(600,600); Laya.stage.addChild(text); Laya.timer.once(1000,this,on...

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

599. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 72%]

...Sprite = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); } } new LayaUISample; ``` 通过data来当做url传递给loadImage这个方法引擎就会帮我们加载并解码显示出来。loadImage这个方法中的参数不仅仅有接收地址的url还接收base64和s...

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

600. 用ide打包后的图片,Texture显示不出来? [ 72%]

...aded)); function onLoaded(){     var aa = new Sprite();     Laya.stage.addChild(aa);     var texture = new Laya.Texture();     texture.load('comp/zzw.png' );     setTimeout( function(){         aa.graphics.drawTexture(texture,0,0);     }, 1000 ) } 3Q 2017-12-26 添加评论 免费...

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