Read an object from compressed file generated from ActionScript 3

Posted by Last Chance on Game Development See other posts from Game Development or by Last Chance
Published on 2012-10-21T11:44:52Z Indexed on 2012/10/23 5:28 UTC
Read the original article Hit count: 230

Filed under:
|

I have made a simple game Map Editor and I want to save a array that contain map tile info to a file, as below:

var arr:Array = [.....2d tile info in it...];
var ba:ByteArray = new ByteArray();
ba.writeObject(arr);
ba.compress();
var file:File = new File();
file.save(ba);

I had successfully saved a compressed object to a file. Now the problem is my server side need to read this file and decompress the array out from the file, then convert it to a Python list. Is that possible?

© Game Development or respective owner

Related posts about actionscript-3

Related posts about python