3 Replies Latest reply on Jul 8, 2009 10:02 PM by Flex harUI

    Trust a domain throughout entire application

    Brent Lamborn Level 2

      This might be Flex 101, but I don't seem to be able to find it. Is there a way to trust a outside domain throughout an entire Flex app?


      I load SWF images into my Flex app that are generated dynamically and retrieved from a web service running on a seperate subdomain . The dynamically generated SWFs don't "obey" the crossdomain.xml file, so instead, right now I am setting the LoaderContext on each of the Image components to one that loads the SWF's into the main App/Security domain like this (to avoid security exceptions):


      image.loaderContext = 
      new LoaderContext(false, ApplicationDomain.currentDomain, SecurityDomain.currentDomain);


      I have several Image components I have to do this for, including in several Modules loaded into the app. Is there a way I can do this once for the entire app?