ActionScript 3的共享对象不跨越不同的主权财富基金坚持?主权、对象、不同、财富

2023-09-09 21:24:56 作者:⒈亇亽旳仦緈鍢

我服二读取和写入同一个共享对象变量不同的主权财富基金。的共享对象变量是一个数,并且每个瑞士法郎检查该号码,以确保它不使用两次相同的号码。那么它存储它选择的最后一个数字。这样既主权财富基金不应该使用相同数量的两倍,无论哪个顺序正在加载。

I am serving two different swfs that read and write to the same SharedObject variable. The SharedObject variable is a number, and each swf checks that number to make sure it isn't using the same number twice. It then stores the last number it selects. In this way both swfs should never use the same number twice, no matter which order they're loaded.

如果我反复加载的主权财富基金之一,从未两次轮换工作。然而,切换时来回SWF之间,有时数被重复。共享对象应该是全球性的Flash播放器,那么,为什么会出现这种情况?

If I repeatedly load one of the swfs, the never-twice rotation works. However, when switching back and forth between swfs, sometimes the number is repeated. SharedObjects are supposed to be global to the Flash Player, so why would this happen?

感谢

推荐答案

共享对象实际上是给出了自己的文件夹,以便它们不会潜在地与另一碰撞SO同名。如果您想拥有多个SWF的访问单一的话,那么你需要指定允许Flash来为您创建一个为实际的路径,从而代替。这迫使SWF读/写一样的,所以。

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