actionscript-3flashairshared-objects

Adobe AIR read .sol file of Flash Player


I have a problem with Shared Objects files when I need read the .sol of the Flash Player with a Adobe AIR application.

The path of the Flash Player Shared Objects is:

C:/Users/%username%/AppData/Roaming/Macromedia/Flash Player/#SharedObjects/%randomnumber%/localhost/

However, the path of the Adobe AIR Shared Objects is:

C:/Users/%username%/AppData/Roaming/%applicationname%/Local Store/#SharedObjects/#localhost/

How can I read a Flash Player Shared Object with Adobe AIR application?

I tried:

What can I do to solve this?


Solution

  • Flash Player/AIR does not have a built in way to read a .sol file directly. Of course the SharedObject class is the way you're supposed to access SO data, but it comes with restrictions and as you noted reads from a specific known path, it cannot be used to parse any .sol file directly. To read a .sol file you would need to use FileStream then parse the ByteArray directly following the .sol format... of course .sol uses AMF to store the data so readObject should work for a portion, but the file format (header, etc) is its own format that must be parsed out. Unfortunately finding good documentation on the format is very hard. There are a bunch of SO readers out there already, you might be able to use one as a reference: