Just noticed, it's documented in Flex 2.0.1 docs.

http://livedocs.adobe.com/flex/201/langref/flash/external/ExternalInterface.html#addCallback()


SecurityError  — The containing environment belongs to a security
sandbox   to which the calling code does not have access. To fix this
problem:
In the <object> tag for the SWF file in the containing HTML page,
set the following parameter:

<param name="allowScriptAccess" value="always" />
In the SWF file, add the following ActionScript:

flash.system.Security.allowDomain(sourceDomain)

-abdul

On 11 Apr 2007 05:23:58 -0700, Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
>   Sounds like you are running into security sandbox issues.  You may need a 
> crossdomain.xml, but I'm not sure if that will work for JavaScript oriented 
> stuff.
>
>  At 10:44 PM 4/10/2007, Gautam wrote:
>
>
> 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.
>
>
>
>  --
>  Jeffry Houser, Software Developer, Writer, Songwriter, Recording Engineer
>  AIM: Reboog711  | Phone: 1-203-379-0773
>  --
>  My Company: < http://www.dot-com-it.com>
>  My Podcast: < http://www.theflexshow.com>
>  My Blog: < http://www.jeffryhouser.com>
>  Connecticut Macromedia User Group: < http://www.ctmug.com>
>
>
>              


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to