4 Replies Latest reply on Dec 17, 2014 12:48 AM by ahsijetaisriche

    cross domain issue between html and flex

    ahsijetaisriche Level 1

      We have a Flex 3 application hosted on Tomcat 5.5 on domain ".www.mycompany.com".

      This Flex app loads an HTML page and we use externalInterface to execute ActionScript code contained in the Flex 3 application from Javascript contained in the HTML page.

      When the HTML page is located at "www.mycompany.com/myHTMLpage.htm", everything works fine, we can see an alert displayed by the ActionScript code executed from the JavaScript code.

      But we need to have this page located at "subdomain.www.mycompany.com/myHTMLpage.htm", and there it does not work.

      The alert is not displayed, meaning the external interface does not work due to cross domains issues, since it works when on the same domain.

      We have been through the Flex documentation and placed a crossdomain.xml file like the one below at the root folder of the web site of the Flex application. Still not working.

      Please advise to what we need to do to make it work.

      Our crossdomain.xml file:


      <?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">


      <allow-access-from domain="www.mycompany.com" />

      <allow-access-from domain="subdomain.www.mycompany.com" />