0

I am currently reading and writing .sol file by using Flash Projector with localpath "/" and .sol file is being saved at "C:\Users\<username>\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\<randomcode>\localhost" and works fine with projector so

Problem is:

When i try to use it Adobe AIR it saves the .sol file at "C:\Users\<username>\AppData\Roaming\<app id>\Local Store\#SharedObjects" and i cant use it with Adobe AIR

Some part of the code:

      {
         if(!olympData)
         {
            Security.exactSettings = false;
            skidData = SharedObject.getLocal("OlympDATA","/");
         }
         return olympData;
      }

Which localpath should i write instead of "/" to be able to use it with Adobe AIR?

  • Please clarify the problem. **AIR** can read and write **SharedObject**, it works. What's wrong? – Organis Jan 15 '22 at 02:34
  • Problem is when i use Flash Projector can read and write SharedObject but with AIR it doesnt write the .sol file so cant read too . – Safa Doğanay SELİM Jan 15 '22 at 09:29
  • I never needed to mess with SharedObjects, but what happens if you manually copy/paste the [AIR] sol file to example `c:\test\ ` from `...\Local Store\#SharedObjects` and then use getLocal as `skidData = SharedObject.getLocal("OlympDATA","c:\test\");`, now does it load? **PS**: If this was my problem, I would just make my own custom Object and save it as (text) file. See [this example of custom Object as File](https://stackoverflow.com/a/53673405/2057709). – VC.One Jan 15 '22 at 11:10
  • @SafaDoğanaySELİM In your question you said that **AIR** saves **SharedObject** to a certain path. Now you say that **AIR** doesn't. Which one is correct, then? – Organis Jan 15 '22 at 19:10
  • What i meant it creates the folder but it doesnt create .sol file . Specifying path doesn't work. – Safa Doğanay SELİM Jan 15 '22 at 23:00
  • @SafaDoğanaySELİM Okay but are you able to save any file, somewhere using AIR? **If yes**, then just consider making/saving your own Object. **If no**, then maybe this is a O.S issue (_ie:_ it's silently not letting your app write any files)... – VC.One Jan 16 '22 at 18:20
  • @SafaDoğanaySELİM Are you sure you did a thorough experiment? I mean, **getLocal(...)** is not supposed to actually save anything as there's nothing to save, only adding some actual data to the **SharedObject** instance (with an explicit **flush()** to haste things) should. Because **SharedObject** is supposed to work in literally any environment, even on **Android** / **iOS** with no additional permissions. – Organis Jan 16 '22 at 20:34

0 Answers0