External file

I’ve used this AS to load an external .txt file

[AS]
loadText = new loadVars();
loadText.load(“company.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
textField.text = this.companytxt;
};
[/AS]

it works fine when the company.txt file is in the same folder as my swf file. (in my computer)
the problem arise when i upload both of this files into my website.
flash does not display the data in company.txt file.
why it does not work?

how can i modify the AS? I:-)

[AS]var loadText = new loadVars();
loadText.load(“company.txt”);
loadText.onLoad = function(success) {
if (success) {
textField.text = this.companytxt;
} else {
textField.text = “Error loading data”;
}
};[/AS]Should work :-\

still wont work

here is the link when i upload it
http://www.mcb-e.netfirms.com/testload.html

and this is the file

I cant see anything wrong.
Try replacing the content of your txt file for:

companytxt=test test test&

nothing happen claudio

i’ve changed it
i still didn’t get whats wrong

Well than i dont know whats wrong. It works for me.
:-\

it work for you when you open it on your computer?
or when you upload it?

It works both ways.

can i have a look at your website where you upload it

Sure
here

I know this might be an outdated thread, but I was wondering if Neo-Geo figured out what was wrong? I’m doing something similar - using a txt file for content inside my swf.

It got me all worried reading this post so I checked out my files and they worked ok. If you’re interested reply here. :slight_smile:

mjrchaos

i’ve got the problem mjrchaous, netfirms does not allow you to do that. (i dont know why)
i try with other web host, and it works fine

:snug:

Sux about the poor web host. Great to hear that you figured out the problem though.

c ya around,
mjrchaos