views:

102

answers:

2

Hey everyone,

My Flex application is successfully calling functions in a JavaScript file through the ExternalInterface class when these are in the bin-debug folder and the JS file is located in the same directory as the Flex app.

But when I test the Flex app on the server, it is not interacting with the JavaScript. The only difference I can find is that on the remote server the JS file is being pulled in from a URL, instead of locally. The JS file URL is in the same domain as the Flex application, therefore I don't think this is a cross-domain issue. What am I missing?

Thanks!

A: 

Your problem is in the URL. This requires an additional security setting in your ActionScript code.

You need to include the following in your ActionScript code:

Security.allowDomain("mysite.com")

Here is a graphic description from Adobe:

alt text

Todd Moses
I will try this, thx!
Mauricio
Unfortunately, this did not work. Any other ideas?
Mauricio
A: 

Make sure that the allowScriptAccess parameter in the SWF embedding html is not set to never. If it is currently set to never, change it to sameDomain or always.

Amarghosh
Thanks, already specified to sameDomain, still not working...
Mauricio