1 Reply Latest reply on Apr 7, 2009 9:51 PM by kglad

    Silent post to php instead of getURL()

      Hi everyone...I'm very new to FLASH and I've created a submit to email with AS1 and AS2...Basically I'm currently using a getURL method in my action below...however when you submit eveything works but I don't want the page to refresh. I wanted to silently send the information to the php file and let it take care of it...I guess I have to use LoadVars() intead....

       

      I just don't know how to do this...anyone can help I greatly appreciate it....Thanks!

       

      on (release) {
          for (i=1; i<_parent.fields_descriptions.length; i++) {
              if (_parent[_parent.fields_descriptions[i][1]]!=undefined) {
                  this[_parent.fields_descriptions[i][1]]=_parent[_parent.fields_descriptions[i][1]]+"&777& "+_parent.fields_descriptions[i][2];
              }
             
          }

       

          this.recipient=_parent.rec;
          delete(i);
          getURL("contact."+_parent.serv, "_blank", "POST");
          trace ();
      }

        • 1. Re: Silent post to php instead of getURL()
          kglad Adobe Community Professional & MVP

          try:


           

          on (release) {

          sendLV=new LoadVars()

          receiveLV=new LoadVars();

          receiveLV.onLoad=function(){

          //do whatever

          }

              for (i=1; i<_parent.fields_descriptions.length; i++) {
                  if (_parent[_parent.fields_descriptions[i][1]]!=undefined) {
                      sendLV[_parent.fields_descriptions[i][1]]=_parent[_parent.fields_descriptions[i][ 1]]+"&777&"+_parent.fields_descriptions[i][2];
                  }
                 
              }


              sendLV.sendAndLoad("contact."+_parent.serv, receiveLV, "POST");
          }