I’m sure this is an easy fix but for some reason I cannot get the text field to accept HTML coding when I’m loading the text in. I have the Render Text as HTML (<>) button checked but still nothing happens. Here’s the code I’m using:
var externalData:LoadVars = new LoadVars();
externalData.onLoad = function() {
news_txt.text = externalData.newsText;
}
externalData.load("News_Text.txt");
I’m thinking I need to add something similar to this??:
Okay, now I have a new problem with the external text files. Everything worked fine when I was testing it on my computer but when I uploaded the file to the server and tested it, the only text that loaded was “undefined”. Is there something else I need to do in order to make this work correctly?
theres a really helpful tutorial on flashkit.com about loading external text. go to flashkit and do a search for “textformatter” in the tutorials section.
Thanks for the response. I tried out a few tutorials on FlashKit and still nothing. I thought I just had to maybe change the path to “http://…” instead of “News_Text.txt” but still didn’t work. Any other suggestions??
make sure that everything is named the same in your files and on the server. I had a text file capitalized on the server and not in my AS and that screwed it up.
Oh man, that was exactly it. My AS was saying News_text.txt and my file name was News_Text.txt … still doesn’t make sense why it would work on my hard drive and not the server. Either way, it’s finally fixed. Thanks for the help guys. I know I’m going to have more problems before this site is finished.