Posted on 2010-01-25 19:20
S.l.e!ep.¢% 阅读(411)
评论(0) 编辑 收藏 引用 所属分类:
A·M·F·3
flash 生成二进制传给PHP2009-03-10 13:04 import flash.utils.*;
import flash.net.*;
var val:Array = ["5656","明天"];
var byteArr:ByteArray = new ByteArray();
byteArr.writeObject(val); //转为AMF格式的二进制
byteArr.compress(); //压缩二进制
//byteArr.uncompress(); //解压缩二进制
//byteArr.readObject(); //读取二进制
var url:String = "http://192.168.10.46/flash_test/item_class.php";
var request:URLRequest = new URLRequest(url);
var variables:URLVariables = new URLVariables();
request.method = URLRequestMethod.GET;
variables.val_string = byteArr;
request.data = variables;
navigateToURL(request);