# How do you convert this to ActionScript 3.0?

**URL:** <https://forum.kirupa.com/t/how-do-you-convert-this-to-actionscript-3-0/324942>\
**Category:** flash\
**Created:** [September 16, 2011, 9:59pm UTC](https://forum.kirupa.com/t/how-do-you-convert-this-to-actionscript-3-0/324942 "2011-09-16T21:59:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flash\_flea](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@Flash\_flea](https://forum.kirupa.com/u/Flash_flea)\
**Post date:** [September 16, 2011, 9:59pm UTC](https://forum.kirupa.com/t/how-do-you-convert-this-to-actionscript-3-0/324942/1 "2011-09-16T21:59:12Z")

</div>

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

```auto

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?
