战略决策的LocalConnection IDS独特战略决策、独特、LocalConnection、IDS

由网友(繼續微笑夏末)分享简介:我用一个LocalConnection以允许ActionScript 2的SWF和一个ActionScript 3 SWF之间的通信。LocalConnection对象共享跨越用户的PC一个全局命名空间。因此,这意味着,用户可以启动我的Flash应用程序在一个浏览器,并提交命令,反反复复,这正是我想要的。但用户也可...

我用一个LocalConnection以允许ActionScript 2的SWF和一个ActionScript 3 SWF之间的通信。 LocalConnection对象共享跨越用户的PC一个全局命名空间。 因此,这意味着,用户可以启动我的Flash应用程序在一个浏览器,并提交命令,反反复复,这正是我想要的。但用户也可以启动其他浏览器,并将其发送到我的应用程序的所有命令将被首先应用程序来处理,如果它在第一个浏览器仍然加载。 对于我而言,这是非常糟糕的。 当我做出的LocalConnection,我指定一个ID,但ID必须是已知的ActionScript 2的主权财富基金,并在其中我发现一个问题。我不知道如何让ActionScript 2的主权财富基金的了解独有的ID​​是什么。 任何想法,以什么可以做的?

I'm using a localconnection to allow communication between an actionscript 2 swf and an actionscript 3 swf. Localconnection objects share a global namespace across a user's pc. So, this means, a user can fire up my flash app in one browser, and submit commands, back and forth, which is what i want. But the user can also fire up another browser, and all commands sent to my application will be handled by the first application if its still loaded in the first browser. For my purposes, this is very bad. When I make the LocalConnection, I specify an id, but the id must be known to the actionscript 2 swfs, and therein I find a problem. I don't know how to let the actionscript 2 swfs know what the unique id is. Any ideas as to what could be done?

推荐答案

嵌入两个主权财富基金时,穿越Flash变量的ID。你可以做到这一点的服务器端或客户端的JavaScript。你可以用户时间戳或随机号码,作为唯一的ID由双方的swf共享

Pass the id through flashvars when embedding both swfs. You can do this server-side or client-side with Javascript. You could user a timestamp or a random number to act as the unique id shared by both swfs.

阅读全文

相关推荐

最新文章