.txt file is not loading into .swf

I have a .txt file that will load into my .swf when i'm using Flash or I open the .swf in the Flash Player. When I try to view the .swf through the internet(from my own server that's in my home) the .txt file doesn't load into the .swf. Everything is in the relative directory so I don't know what else to do, yet. Any Ideas?

How is everything in a "relative" directory? Are all three files in the same folder, or is the HTML page in one folder and the SWF and TXT file in a subfolder? If it is the latter, you may need to add the subfolder's path in your SWF. Here is what I mean:

page.html is in the main folder, and page.swf and page.txt are in the assets subfolder. If the SWF loads page.txt and assumes it is in the same folder (which it is) it would work fine. Once you load the SWF into an HTML page, that becomes the folder everything is based on. So, in this case, the path would need to be changed to assets/page.txt. Is this similar to your setup?

I neglected to mention previously that the .swf that is loading the text file is being loaded into a preloader .swf. I bet that has something to do with it, as I've experienced other issues because of this.

Are the two TXT files being opened in the same fashion? What I mean is, if you rename the one that is working and try to load it in place of the one that isn't, what happens?

Also, what indication do you have that the file isn't loading? If you haven't, one way to do this is use the parameter passed to the onload handler. Of course, once you launch from the web, you can't trace. Here is the trick I use (assuming you are targeting Flash 8 or higher), you may have another:

Each load() call has slightly different params. Loading CSS or XML you can use

Depending on how you load files, calls are different (loadVars and loadMovie have different parameters in their onload handlers--you can look up exactly what they are in the Flash help). For XML and CSS, it is a simple true or false. This will pop up a JavaScript alert. If you have more than one parameter, do this:

It is a great debugging tool for when you are working from the web and can't use trace.

Unfortunately, I am in the process of moving and don't have my main computer up and running yet. I can probably take a look if you like in the next few days. Depending on the size of the files, you could zip them up and upload them to a web server (which is probably easiest, and would allow other people to help out as well--just be sure to post the link here!) or send an e-mail to work@maxherzig.com.

First of all, I know that the files isn't loading properly because a dynamic text box isn't showing the text from the file. When I rename and switch the files, the file that wasn't loading previously loads, and the file that was loading previously doesn't load. Just to be sure, the files loads when I'm testing the movie in Flash, and when I load the .swf in Flash Player the dynamic text box displays the text from the file. I'll try using the alert box to test some variables

Well, thanks for your effort, but I figured out that if you do not embed the characters for the dynamic text box, text won't appear. I think that was the problem. It is working now anyway. Maybe switching around the names of the files did something?? Probably not but that was the only other things that I did to the files!