- registerClassAlias("wills",SceneMapFromFlash); // 为 SceneMapFromFlash 这个Class注册一个别名:wills
- var obj:SceneMapFromFlash=new SceneMapFromFlash();
- var arr:Array=new Array();
- var byte:ByteArray=new ByteArray();
- byte.objectEncoding=ObjectEncoding.AMF3;
- byte.writeObject(arr);
- byte.compress(); // 压缩
- var file:File=new File("D:/workSpace/playHut/1.txt");
- var stream:FileStream=new FileStream();
- stream.open(file,FileMode.UPDATE);
- stream.writeBytes(byte);
- stream.close();
转自:http://blog.37studio.net/?action=show&id=24