I have this in a button code but the trace says "undefined" when i click the button however when i debug..."global.attempt1" has the correct variable in it. If i click the button a second time.. the trace comes up correctly.
******************
on (release) {
_root.emailVar = _root.emailBox.text;
_root.passwordVar = _root.passwordBox.text;
myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
_global.attempt1 = myLoadVars.attempt;
};
myLoadVars.load(" trace(attempt1);
}
**************
******************
on (release) {
_root.emailVar = _root.emailBox.text;
_root.passwordVar = _root.passwordBox.text;
myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
_global.attempt1 = myLoadVars.attempt;
};
myLoadVars.load(" trace(attempt1);
}
**************