ActionScript 3 SharedObjects don't persist across different swfs?

淺唱寂寞╮ 提交于 2019-12-02 08:18:53

Shared Objects are actually given their own folder so that they do not potentially collide with another SO of the same name. If you want to have multiple SWF's access a single SO, then you need to specify an actual path for the SO instead of allowing Flash to create one for you. This forces the SWF to read/write the same SO.

Here is the article that contains a deeper explanation and a few different solutions:

http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d80.html

SharedObjects are filename-specific and location-specific the root path is:

C:\Users\username\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\436UUXWX\

but for www.example.com/res/flash/file1.swf and www.example.com/res/flash/file2.swf it will be:

C:\Users\username\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\436UUXWX\www.example.com\res\flash\file1.swf\

and:

C:\Users\username\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\436UUXWX\www.example.com\res\flash\file2.swf\
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!