Skip to main content
Inspiring
Apr 10, 2014 7:29 PM UTC
Question

SharedObject on AIR on Windows. Help!

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

Colin Holgate
Inspiring
Apr 10, 2014 7:37 PM UTC

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?

Translate
UmanoffAuthor
Inspiring
Apr 10, 2014 7:43 PM UTC

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

Translate
UmanoffAuthor
Inspiring
Apr 10, 2014 7:49 PM UTC

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\

Translate