2 Replies Latest reply on Aug 17, 2007 1:02 PM by KG800

    loading external from text file

    KG800 Level 1

      I created a flash file that pulls text files and images. I have the text files and images posted to the web and in my flash file I have absolute url's to the location. When I test the movie on my computer it works fine, but once I upload the flash file the images pull in but the text files won't, I get the else of my if statement saying there is an error. Any help would be greatly appreciated.

      here is my code
        • 1. Re: loading external from text file
          Flash won't load the text files from a domain different than of where the swf is laoded from. This is a violation of flash's security. If the text files resides in a different domain than that of the swf, then you will need to add your swf's domain in cross-domain.xml file. This cross-domain.xml file should reside in the root of the website that houses your text files.

          Another solution/work-around is to move the text files into the same domain as your swf.

          It works from the development envrionment becaues the security measures aren't enforced there. It won't work locally outside of flash either unless you explicitly give it permission.

          • 2. Re: loading external from text file
            KG800 Level 1

            Thanks for your answer. I am running the swf file and the txt files under the same domain. They are in separate folders, but under the same domain. I tried running them in the same folder and the txt files were still not pulling in.