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();
}
}
}
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?
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.
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\