How do you convert this to ActionScript 3.0?

I’m stumped with this code - it seems that every time I port some of the reserved words of this AS2 code (what it does is to
send mail using both Flash and PHP), I’m getting errors…

stop();

var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage = theMessage.text;
senderLoad.sendAndLoad(“http://leebrimelow.com/mailExample/send.php”,receiveLoad);
}

receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop(“success”);
}
else {
_root.gotoAndStop(“failed”);
}
}

Any idea how?

in actionscript 3 you don’t use SendVars and LoadVars, you use URLLoader

check out the following for some examples:

Will check it out - thanks for the tip :slight_smile: