on(release) {
loadText = new loadVars();
loadText.load(“mailing.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
mailing.text = this.input;
}
};
just wondering what is wrong with this. i am trying to have it so that when you click this button. (submit) it will load the text that is in mailing.txt and desplay it in the input box. any suggestions. i cant get it to work. thanks for your help
Firstly it should be LoadVars note the case. Another thing is it is generally a good idea to put the load call after you define the onLoad handler. This way if the file loaded immediately it would still find the onLoad handler defined.
on (release) {
loadText = new LoadVars ();
loadText.onLoad = function (bSuccess) {
if (bSuccess) {
mailing.text = this.input;
};
};
loadText.load ("mailing.txt");
};