Skip to main content
August 16, 2007
Question

loading external from text file

  • August 16, 2007
  • 2 replies
  • 195 views
Hi,

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
This topic has been closed for replies.

2 replies

August 17, 2007
cramroop,

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.

KG
Participant
August 17, 2007
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.

©®