views:

189

answers:

2

I'm trying get LocalConnection to work between two swf's placed within two different IFRAMES. I've worked with LocalConnection often without too much trouble. But this time --i suspect because of the iframes--i can't get it to work.

Anybody experience the same?

A: 

... Ok, tried this in many different ways, but it seems that Communication between iframes using LocalConnections is not allowed.

sthg
Make sure that you are prefixing the the connection name used in both the connect and send functions with an underscore (example: _foo). You'll also need to specifiy the wildcard "*" to allow calls from all domains.
carlsz
yowsa, I spent a long time on this too - I had tried absolutely everything mentioned everywhere EXCEPT the underscore convention. Ugh.
Danjah
+1  A: 

Actually, it is allowed. The SWFs are all sandboxed to the same flash player instance. You just need to insure that your security configuration is correct. Take a look at the LiveDocs for LocalConnection's allowDomain function.

carlsz
Cool thanks for the tip!
sthg