Hi,
allowScriptAccess allows only ActionScript to execute JavaScript code.
To allow JavaScript to execute/access ActionScript, you would probably
need
Secruity.allowDomain ("domain-name") in your Flex-app.
Please read the Flash Player 9 security white paper and
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16494
hope that helps..
-abdul
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Can you post a small test case?
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Gautam
> Sent: Tuesday, April 10, 2007 7:43 PM
> To: [email protected]
> Subject: [flexcoders] javascript-flex/actionscript communication
>
>
>
> Hi,
>
> I am using the ExternalInterface API to communicate between JavaScript
> and Flex App. The sample code that I wrote to check this functionality
> works perfectly fine.
>
>
> However, the same does not work for a slightly different scenario
> described below:
> The application that has my swf and js files are being referenced by
> html pages located on different domains.
> I am embedding the Flash Object in the html using JavaScript and have
> set the parameter "allowScriptAccess" to "always" to allow
> cross-scripting. I am inserting the flash object when the webpage loads
> in the browser within a div tag through a custom browser toolbar using
> javascript. (currently testing on firefox)
>
>
> When I test my sample application on the localhost domain, flex app is
> able to call a method in javascript but the reverse is not working and
> for any other domain, communication doesn't happen both the ways.
>
> Is there a way secure way of handling the above situation both in
> Firefox and IE.
>
>
> Regards,
> Gautam.
>