SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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?

  2. #2
    SitePoint Member
    Join Date
    Jul 2011
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in actionscript 3 you don't use SendVars and LoadVars, you use URLLoader

    check out the following for some examples:
    http://tush.wordpress.com/2007/07/20...ver-variables/

  3. #3
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Will check it out - thanks for the tip :-)


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •