Hi all, first time posting, all that good stuff.
Introductions aside, I’ve got a bit of a problem that I’d appreciate answers to, and this looks like the best place for those answers.
I’m building a site that incorporates a Flash movie to display text files. I used the tutorial located in the advanced section on kirupa.com, but I ran into a problem with the code involved.
The code is as follows:
on (release) {
loadText = new loadVars();
loadText.load(“news.txt”);
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}
That code is attached to a button, News, that is supposed to display the news text file.
The problem I have is that I need to display a text file already existing at a specific URL, and the code there seems to only work for a local text file. Now, I tried replacing “news.txt” in the third line with the URL, but that doesn’t work. This text viewer needs to be adaptable in that it has to work on 25 or so different pages and point to 25 or so different text files (it’s a website for my dorm floor, and everyone is going to have a news section). I need to be able to have everyone able to upload their text file and have it automatically update.
Basically, I would like it to be able to point at a specific URL to open the file. I tried putting the text files into the folder that the Flash file was saved in and published to, but that didn’t work either. If I could get it to look in the folder it’s located in, that would work, too (that way I can avoid changing them all to specific URLs by hand).
Anyway, I got no sleep and most of this is probably illegible, but if anyone could help I would greatly appreciate it.