SharedObject在Flash Player上很好,但没有继续使用AIR

时间:2014-04-10 19:36:11

标签: flash air

下面的代码在发布到FlashPlayer时正常写入。在Windows 7或XP上发布到AIR(3.9)时,它根本不写。我希望它只是我,而不是一个主要问题。与AIR。

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

1 个答案:

答案 0 :(得分:0)

供将来参考:

使用 AIR 发布时,SharedObject文件的位置:

Windows 7

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

Windows XP

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

使用 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\