When I click on a button eg news, I use the loadmovie function to load news.swf. In news.swf, I have the following command (from Kirupa scrolling dynamically loaded text tut) to load a text file in:
stop();
loadText = new loadVars();
loadText.load(“news.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.newstext;
};
This works FINE locally (on my HD0, but when I upload, the text isn’t loaded!!
I’m not 100% sure, but I think the problem is that on your HDD, the file loads up really fast (it’s loaded even before the onLoad function is declared). I think if you put the onLoad definition in a frame loop and have the loop stop when the file is loaded, then it will work on the server. Something like this:
Frame 1:
loadText = new loadVars();
loadText.load("news.txt");
//creating the loadVarsText function
Thnx… but it stil duznt seem to be wrking. I tried anutha method found on Macromedia’s site, which again wrkd fine locally, but didnt when I uploaded. Nemore suggestions?
Oh sorrry!!! Ok, when u open home.fla, u hav three layers right? (actions, content, bg).
On the content layer, double click the movie clip (the fisrts frame is “empty” so on the stage all u will see is a white circle). Once u are in that movieclip (called boxDrop),the actions are at the end of the timeline on the actions layer.
Ok…I haven’t tried this on a server (I don’t have one), but I think it should work. I just editted the actions layer in that MC that sits on the root content layer.
-Al
::EDIT:: darn, can’t attach it…too big. ok, here’s the AS:
I am SO stumped… IT’s STILL NOT WORKING!!! Thnx for trying, but it still doesnt want to load the text file!!! Check it out at www.decyfa.netfirms.com to see wot I mean!
I WAS UPLOAIDNG TO A FREE SERVER, ADN I HAD A SUDDEN IDEA WHEN U SED THAT IT WORKED FINE ON UR SERVER, THAT IT WAS MY SERVER!!!:crazy: :crazy: :crazy:
Ur code worked FINE when I uploaded to my host, its just that I was uploading to a server which doesnt seemt o support it - probably because its free!!!