PDA

View Full Version : sendAndLoad from within on(release)



jpn
September 3rd, 2003, 07:57 PM
// within a movieclip
on(release) {

// code that launches an input box containing another button
////////////////////////////////////////////

myInputBox.btnGo.onPress = function () {
myURL = 'filename.php';
myVars = new LoadVars();
myVars.sendAndLoad(myURL, myVars, 'post');

// this part won't work... I guess I can't declare functions within others...
myVars.onLoad = function() {
// extract the LoadVars data... but I can't
};

};

}


How can I get the values of myData from within a nested function? Or, how can find out when the loadvars have loaded from outside the myInputBox.btnGo.onPress function?

Thanks in advance