Answered
LoadVars
this is driving me mad. i am using flash mx 2004 (on mac)
I have the text file named "news.txt" in the same folder and my published swf file, but it will not load it, it just gives me a blank text box.
in the text file i assigned the text: info=this is my text.
and the dynamic text field is named "myText"
i have an intro, so the text field doesnt show up until the 60th frame, which is where i placed the actionscript - does this matter?
here is my code:
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
myText.htmlText = myLV.info;
} else {
myText.text = "There was an error when loading the external file.";
}
};
myLV.load("news.txt");
I have the text file named "news.txt" in the same folder and my published swf file, but it will not load it, it just gives me a blank text box.
in the text file i assigned the text: info=this is my text.
and the dynamic text field is named "myText"
i have an intro, so the text field doesnt show up until the 60th frame, which is where i placed the actionscript - does this matter?
here is my code:
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
myText.htmlText = myLV.info;
} else {
myText.text = "There was an error when loading the external file.";
}
};
myLV.load("news.txt");
