大约有 51 项符合查询结果, 库内数据总量为 30,938 项。 (搜索耗时: 0.0033 秒)
分享:本地自定义事件的注册侦听及发送 感谢:https://ask.layabox.com/question/3957 仿照该教程写了一个as3版本的 内容是 界面A发送事件,界面B注册并侦听事件,效果如图 demo如下: CustomEventDispatcher2.zip 附件 : --> 2017-08-16 添加...
来源: Laya_社区 发布时间: 20170816
...览器中,但是这个协议不受使用平台的限制。 websocket 发送数据的格式一般为二进制和字符串。LayaAir引擎已经为我们封装好了websocket 和Byte的类,收发数据结合Byte类就可以完成。下面我们搭建一个简单的收发数据的例子来看...
来源: Laya2.0_文档 发布时间: 20210715
#HttpRequest详解 在项目中我们难免会有发送http请求的需求,在LayaAir引擎中HttpRequest就是我们发送请求的基本类。HttpRequest类其实包装的就是原生的`XMLHttpRequest `,为了开发者更深入的了解这个类,我们先从XMLHttpRequest 开始。 ##...
来源: Laya2.0_文档 发布时间: 20210715
...elist.renderHandler=new Handler(this,onRender);//当list刷新时触发 并发送Box,index this.storelist.mouseHandler = new Handler(this,onMouse);//当list被点击时触发 并发送event,index } public function onRender(cell:Box,index:int):void { //当list刷新时接收并更改单元格属性...
来源: Laya_社区 发布时间: 20180522
...调参数。ReturnsEventDispatcher — 此 EventDispatcher 对象。 请求发送: var hr = new HttpRequest(); hr.once(Event.COMPLETE, this, http.success,[1,2,3]); hr.send("http://localhost:8082/hu_get",{}, "post","json",null); 回调方法: success:function (e,args) { console.log(e); //...
来源: Laya_社区 发布时间: 20180304
EventDispatcher EventDispatcher事件能不能给按钮发送(如点击(Event.ClICK))的事件(但实际上按钮没有被点击) 2017-09-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 cuixueying ...
来源: Laya_社区 发布时间: 20170911
HttpRequest如何发送JSON数据 发送JSON数据 var logReq = new laya.net.HttpRequest(); logReq.once(Laya.Event.COMPLETE,this,this.onComplete); logReq.send("http://127.0.0.1:3001/login", "username: 'lxd', password: 'lxd'", 'post', "json...
来源: Laya_社区 发布时间: 20170906
as怎么用protobytebuf传输数据到服务端 附上部分代码 我发送到服务器,接收到的数据为空,是不是哪里写错了?protibufDemo也是从你们哪里下载下来模拟的,服务端接收代码 WebSocketFrame frame = (WebSocketFrame)msg; ByteBuf buf = frame.content(); ...
来源: Laya_社区 发布时间: 20170405
...一个文件test.as,继承于IDE创建的testUI.as。 在此文件中发送事件,如: this.event("TEST"); 在其他类中,new 出此类,但监听不到。如: var t:test = new test(); t.on("TEST", this, this.onTest); 是写法上有问题么? 2018-01-05 添加评论 免费帖 -...
来源: Laya_社区 发布时间: 20180105
...k); } function onSpriteClick(e) { var randomAngle = Math.random() * 180; //发送自定义事件 sp.event(ROTATE, [randomAngle]); } // 触发自定义的rotate事件 function onRotate(newAngle) { Tween.to(sp, { "rotation": newAngle }, 1000, Ease.elasticOut); } })();module laya { import Sprite = Laya...
来源: Laya_示例 发布时间: 20250315