hello, maybe this will help. first of all, i don't really know loadvariablesnum, but loadVars works better according to everything I've read. I looked at your file, and the following code does what i think you need, if not then maybe i should reread your post.
announcements_txt.text = "Refreshing...";
// displays refreshing until data is loaded
// notice the change in spelling and variable suffix (_txt)
myLoader_lv = new LoadVars();
// creates the object that will load the data from the file
// case sensitive: loadVars is NOT the same as LoadVars
myLoader_lv.onLoad = function(){
announcements_txt.text = myLoader_lv.contents;
delete myLoader_lv;
}
// the onload event is triggered when myLoader is done loading the data,
// and your data was "Contents=this.....", so the myLoader object turned
// your data into a property of itself, so myLoader.contents contains your
// loaded data, and just assign it to the text field text property. Viola
// delete the loader object to free up memory unless you may need
// to use it again
myLoader_lv.load("new.txt");
// this actually starts the download
- announcements_txt.text = "Refreshing...";
- // displays refreshing until data is loaded
- // notice the change in spelling and variable suffix (_txt)
- myLoader_lv = new LoadVars();
- // creates the object that will load the data from the file
- // case sensitive: loadVars is NOT the same as LoadVars
- myLoader_lv.onLoad = function(){
- announcements_txt.text = myLoader_lv.contents;
- delete myLoader_lv;
- }
- // the onload event is triggered when myLoader is done loading the data,
- // and your data was "Contents=this.....", so the myLoader object turned
- // your data into a property of itself, so myLoader.contents contains your
- // loaded data, and just assign it to the text field text property. Viola
- // delete the loader object to free up memory unless you may need
- // to use it again
- myLoader_lv.load("new.txt");
- // this actually starts the download
hope that helps,
I don't like to preach, but i DO like to teach, so...
it is HIGHLY recommended to use standard suffixes for variable names. i.e. _mc for movie clips, _txt for text, etc. for 2 really good reasons
1. it enables code hinting in the authoring environment
2. it lets anyone (including yourself) who looks at your code know what type a variable is