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:
FileStream
class to open the .sol
file with the method readObject
, but it does not work..sol
file to the Adobe AIR Shared Object path and read with SharedObject
, but the Error #2134: Cannot create SharedObject
occurs.What can I do to solve this?
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: