i saw a tutorial on how to click a button and load text from a .txt file but i want to know how to get it to load with out a button?
so that some one can update the .txt file whenever and the flash site will automatically show the changes…
so say you’re using this AS:[AS]on (release) {
loadText = new loadVars();
loadText.load(“TEXT1.txt”);
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}[/AS]
instead, take out the on(release) and it becomes this. put it in the main timeline:[AS]loadText = new loadVars();
loadText.load(“TEXT1.txt”);
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}[/AS]
browser won’t show the change automatically, so add “unique identifier” to your text because browser seems to cache the old text or movie