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

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

101. Sprite-缓存为静态图像 [ 60%]

...: Sprite = new Sprite(); // 随机摆放文本 var text: Text; for (var i: number = 0; i < 1000; i++) { text = new Text(); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#CCCCCC"; text.x = Math.random() * Laya.stage.width; text.y ...

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

102. 网络和格式-Socket [ 60%]

...output.writeByte发送 var message: string = "demonstrate "; for (var i: number = 0; i "); // 使用output.writeByte发送 var message:String = "demonstrate "; for (var i:int = 0; i < message.length; ++i) { output.writeByte(message.charCodeAt(i)); } socket.flush(); } private function onSocketClose(e...

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

103. WebSocket发送与接收数据(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 60%]

... var a:int = this.byte.getByte(); var b:int = this.byte.getInt16(); var c:Number = this.byte.getFloat32(); var d:String = this.byte.getString(); var e:String = this.byte.getUTFString(); } ```

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

104. UI-Label [ 59%]

...eateLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor...

来源: Laya_示例 发布时间: 20241117

105. 网络和格式-XML [ 59%]

...de:any = xml.firstChild; var nodes:Array = rootNode.childNodes; for (var i:number = 0; i item aitem bsomethis..."; var xmlValue:String = "item aitem bsomethings..."; proessXML(xmlValueContainsError); trace("\n"); proessXML(xmlValue); } // 使用xml private function proessXML(source:String):void { tr...

来源: Laya_示例 发布时间: 20241117

106. UI-Label [ 59%]

...eateLabel(color: string, strokeColor: string): Label { const STROKE_WIDTH: number = 4; var label: Label = new Label(); label.font = "Microsoft YaHei"; label.text = "SAMPLE DEMO"; label.fontSize = 30; label.color = color; if (strokeColor) { label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor...

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

107. 经验分享:如何控制龙骨动画的播放索引! [ 59%]

...te var mArmature:Skeleton; private var index:int;//帧频 private var time:Number; public function DragonDemo() { Laya.init(800,600,WebGL); index=15; mFactory=new Templet(); mFactory.on(Event.COMPLETE,this,omTemLoaded); mFactory.loadAni('NewDragon/NewDragon.sk'); } private function omTemLoaded():voi...

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

108. 缓动-简单的Tween [ 58%]

...gColor = "#232628"; this.setup(); } private setup(): void { var terminalX: number = 200; var characterA: Sprite = this.createCharacter("../../res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB: Sprite = this.createCharacter("../../res/cartoonCharacters/2.pn...

来源: Laya_示例 发布时间: 20241117

109. 缓动-简单的Tween [ 58%]

...gColor = "#232628"; this.setup(); } private setup(): void { var terminalX: number = 200; var characterA: Sprite = this.createCharacter("res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB: Sprite = this.createCharacter("res/cartoonCharacters/2.png"); charact...

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

110. 发现TimeLine的一些问题,像是BUG [ 57%]

...加缓动的函数 private function addTime(timeLine:TimeLine,sp:Sprite,yy:Number):void { timeLine=new TimeLine(); timeLine.to(sp, {y: yy}, 3000, Ease.linearIn); timeLine.once(Event.COMPLETE,this, complete,[sp,timeLine]); timeLine.play(0,false); } //清理缓动的函数 private function clearTime(t...

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