Skip to main content
Inspiring
April 10, 2014
Question

SharedObject on AIR on Windows. Help!

  • April 10, 2014
  • 1 reply
  • 519 views

The code, below, writes normally when publishing to FlashPlayer. It does not write at all when publishing to AIR (3.9).

Please tell me I'm doing something dumb!

package source

{

          import flash.display.MovieClip;

  import flash.net.SharedObject;

  public class MAIN extends MovieClip

         {

            var mySO:SharedObject = SharedObject.getLocal("myThing","/")

public function MAIN()

         {

             var thing:int = 12;

             mySO.data.sharedthing = thing;

             mySO.flush();

         }

    }

}

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
April 10, 2014

In setting localpath to “/“, that might make it see another swf’s “myThing”. Does it work if you either use a unique name, or you leave out the localpath parameter?

UmanoffAuthor
Inspiring
April 10, 2014

The .sol filename can be anything. Still nogo for me. Also leaving out "/" changes nothing. Unless I'm really doing something dumb.

UmanoffAuthor
Inspiring
April 10, 2014

Ok, I WAS dumb. For future reference:

When publishing with AIR, location of SharedObject file:

Windows 7

C:\Users\<UserName>\AppData\Roaming\<swfname>\Local Store\#SharedObjects

Windows XP

C:\Documents and Settings\<UserName>\Application Data

with Flash Player:

Windows 7

C:\Documents and Settings\<UserName>\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\4YW7LFD8\localhost

Windows XP

C:\Documents and Settings\<UserName>\Application Data\Macromedia\Flash Player\#SharedObjects\2QL2PDA2\localhost\path\to\<swf_name.swf\