Hey,
I’m trying to load a simple txt file into a Text Area. I have a code but for some reason it doesnt work. If you look at the file that is attached it does’nt even show the text area in when you actually test the movie.
// Specify mytextbox to read text as HTML
mytextbox.html = true;
// Specify mytextbox to wrap text
mytextbox.wordWrap = true;
// Specify mytextbox to have a scrollbar
mytextbox.multiline = true;
loadtextContent = new LoadVars();
// Load the text file into my movie
loadtextContent.load("main.txt");
// Start a new function to load the text file
loadtextContent.onLoad = function(success) {
if (success) {
// loads the file into mytextbox
mytextbox.text = this.mytext;
}
};
Here is the link to the file if you would like to look at the code:
http://storage.globalflyersonline.com/Personal/Andrew%20Polyak/main.zip
I’m not sure whats going on, any help will be appreciated, thanks.
Andrew