Highlighted

SharedObject on AIR on Windows. Help!

Participant ,
Apr 10, 2014

Copy link to clipboard

Copied

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();

         }

    }

}

TOPICS
Development

Views

306

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

SharedObject on AIR on Windows. Help!

Participant ,
Apr 10, 2014

Copy link to clipboard

Copied

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();

         }

    }

}

TOPICS
Development

Views

307

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 10, 2014 0
Adobe Community Professional ,
Apr 10, 2014

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 10, 2014 0
Participant ,
Apr 10, 2014

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 10, 2014 0
Umanoff LATEST
Participant ,
Apr 10, 2014

Copy link to clipboard

Copied

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\

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 10, 2014 0