flash 生成二进制传给PHP

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);

你可能感兴趣的:(flash 生成二进制传给PHP)