dimanche 21 février 2016

Adobe air import SOL file with FileStream

I currently have a function that opens up a file browser and limits the selection to the .sol format. I want this function available for easier backwards compatibility support instead of moving the .sol file to the programs appdata folder. When the user selects a .sol, this function is called:

public function onSelect_sol(event: Event): void {
        var file: File = File(event.target);
        var fileStream: FileStream = new FileStream();
        fileStream.open(file, FileMode.READ);
        savedData = fileStream.readObject();

However the information I get back from the trace is "null". What do I have to do to make it so I can use the information is the sol? I know this can be done, as the minerva sol editor uses adobe air and can open .sol files: http://ift.tt/NHOp6R

Aucun commentaire:

Enregistrer un commentaire