views:

246

answers:

1

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?

+4  A: 

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.

Juan Pablo Califano
that sounds good, will look into it.
Irwin