Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load external txt file

Status
Not open for further replies.

NitaNita

Programmer
Sep 11, 2003
20
US
Hi again. I'm here with another question. I have my flash movie set up to display a text file in a particular spot. The reason why I wanted a text file is so that it can be changed regularly without me having to change update the entire swf file. Anyway, it works when I preview it on my computer but after I've uploaded it, it no longer works. Nothing loads in the spot anymore. I hope someone can help me out here. I thought I had finally worked out all the bugs.
If you need to take a look at the .fla file, the url is:
Is there something I need to change for it to work over the internet???
 
Your using loadVariablesNum, you should probably look into the new LoadVars() object as described here...

Second half of this page...


If you insist in using loadVariablesNum, and assuming your text file does start up with myText=bla...bla...bla, try adding _level0 (since your loading your text file on the main level) to your textfield's Var...

_level0.myText

I'd clear the textfield instance name also, if you're not using LoadVars(), and you can uncheck the Selectable tab (Ab) in your textfield's properties, most probably useless in your case.

Don't think it's the case in your situation (only had a quick look at your .fla), but you might need to embed the font used (in case of masking or tweening), and there's a remote chance that your text would not have time to load online, in which case, you would have to loop the text load until you were sure it was in fact loaded.

Regards,

cubalibre2.gif
 
Thank you both for your input. And I downloaded the modified fla file. It still only works on my computer. But when I uploaded it, I see nothing.
 
it looks like this
myText=Recent Updates: there are no recent updates
 
do you see the text i used for testing

may have spotted it..........should be

&myText=Recent Updates: there are no recent updates&
 
I changed it and it still only works on my computer. does it have anything to do with the fact that the movie is being loaded under my navigation?
 
if main content is being loaded into another file then this may be a path problem

if thats the case then change this line to reflect the path

_root.clipName.loadspot.text = lv.mytext;
 
link dont work...comes up files not found and spawns a dozen pop ups...just email me the file
 
lv = new LoadVars()
lv.onLoad = function(){
_root.contents.loadspot.text = lv.mytext;
}
lv.load("recentupdates.txt");

works fine for me....i meant for you to change clipname to the clip name...guess that wasnt clear
 
I think my computer has it out for me. I changed it and I still don't see anything. Do I need to change something in the text file also? It still looks like this: &myText=Recent Updates: there are no recent updates&
 
I don't get it. It works perfectly on my computer, but as usual once i upload it, it no longer works.
 
I don't know. Is there something I'm doing wrong? Everything works perfectly on my computer but once it's uploaded, it doesn't work. Does anybody know why?
 
Nevermind. I went back and it suddenly worked. My computer was just having a bad day. Thanks for all your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top