ByteArray to File Save
//Global Variable
private var outputByte:ByteArray = new ByteArray();
private var file:File = new File();
// set this code where you want to call
{
outputByte.writeUTFBytes(objectStr);
file.addEventListener(Event.COMPLETE,saveDesignFile,false,0,true);
// create a file with a dummy data
file.save("ds","Saraku.skd");
}
// this code work for save
private function saveDesignFile(event:Event):void
{
var fileWriteStream:FileStream = new FileStream();
fileWriteStream.open(file,FileMode.WRITE);
fileWriteStream.writeBytes(outputByte,0,outputByte.length);
fileWriteStream.close();
}