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

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

921. websocket通信,怎么解压 压缩的Byte? [ 83%]

... 提交 3 个回复 vvv123 赞同来自: 你需要这个,兄弟 用法 var zlib:* = __JS__("Zlib"); var inflate = new zlib.Inflate(new Uint8Array(rawData)); var plain:Uint8Array = inflate.decompress(); var ba:Byte = new Byte(plain); ba.pos = 0; ba.endian = Byte.BIG_ENDIAN;//根据自身情况写 l...

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

922. LayaNative中加载自己缓存的资源 [ 83%]

...l:String,onComplete:Handler,onError:Handler=null):void{ if(window.conch) { var folder:String=window.conch.getCachePath()+"/download/"; if (!window.fs_exists(folder)) { window.fs_mkdir(folder); } var fileName:String = url.replace("http","").replace(/:/g,"").replace(new RegExp('/','g'),"_"); var cache...

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

923. websocket 中 protobuf 数据的发送与接收的具体方法是怎样的? [ 83%]

...我的做法是这样子的: private onAssetsLoaded(data:string):void{ var pack:any = this.ProtoBuf.loadProto(data).build("test"); var MSG_HEADER:any = pack.MSG_HEADER; var byte:Laya.Byte = this.socket.output; byte.writeInt32(MSG_HEADER.LoginGame);//和服务端约定好,前四个字节存放协...

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

924. 使用getChildByName()无法得到子节点对象 [ 83%]

...       //获取当前渲染条目的数据             var data = json[index];             cell._childs[0].text=data.text.text;             cell._childs[1].text=data.listNumber.text;             console.log(index)             //根...

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

925. List中如何动态加载多个image,并为每个image添加监听事件? [ 83%]

...t中如何动态加载多个image,并为每个image添加监听事件? var Index=(function(_super){ function Index(){ Index.super(this); this.data = ["1tong","2tong","3tong","4tong","5tong","6tong","7tong","8tong","9tong","1tiao","2tiao","3tiao","4tiao","5tiao"]; var _dataSource_=[]; for(var i =...

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

926. Node.prototype._activeHierarchy存在的bug或者说是onEnable和onAwake的坑 [ 83%]

...true);         if (this._components){             for (var i=0,n=this._components.length;i < n;i++){                 var comp=this._components[i];                 comp._setActive(true);                 (comp._isScript())&&amp...

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

927. 分享:LayaAir实现曲线运动 [ 83%]

... package { import laya.display.Sprite; public class CurveDemo { private var ball:Sprite; private var xflag:Boolean; private var v:uint=2; private var d:uint=150; public function CurveDemo() { Laya.init(800,400); ball=new Sprite(); ball.graphics.drawCircle(0,0,50,"#FF00FF"); Laya.stage.addChild(ball...

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

928. 使用/*[COMPILER OPTIONS:normal]*/来编译分包无法生成Dictionary类的定义 [ 83%]

...tAA; public class AAA { public function AAA() { TestAA; Laya.stage; Stage; var a:Dictionary = new Dictionary(); a.set('test','aa'); trace(a.get('test')); } } }生成的分包test.js(function(window,document,Laya){ var __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya....

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

929. 使用UI组件tree时,添加的数据结构必须是xml吗?添加xml时对于tree的单元格里面的label如何控制例如visible的属性 [ 83%]

...: 与内容相关的链接 提交 2 个回复 shiyang12345 赞同来自: var xmlString="<data>"+ "<dir name='shi' num='10000' state='已集结' time_pro='' isOpen='true'>"+ "<file num='1000' ok='ok' isOpen='true'/>"+ "<file num='1000' ok='ok' isOpen='true'/>"+ "<file num='...

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

930. 物体随着鼠标滑动旋转脚本 [ 83%]

...么作用 ObjectRotate.prototype._initialize = function (owner) {     var _this = this;     ObjectRotate.__super.prototype._initialize.call(this,owner);       //在this(调取本函数的的对象)作用域内,侦听mousedown(鼠标按下)事件,如果侦听到就执行方法...

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