3 Replies Latest reply on Mar 6, 2012 9:20 AM by kglad

    as3 functionality in as2

    5Systems Level 1

      This is more of an as2 questions, but did not seem a section for that, so sorry if this is the wrong place.  


      I am working with a template that is built in as2, and when a button is clicked, a new browser window opens to a specified url and some info is passed to the php file.   I already have this funcinality via as3 in another site, but my director wants it in this onld as2 template.


      here is my as3 Code:


      //Path to PHP File
      var serverFile:String = "https://www.mypath.net/myphpfile.php";
      //Instantiate a new URLVariables Object
      var postVariables:URLVariables = new URLVariables();
      //add custom variables
      postVariables.GuestUserKey = 'myKeyInfo';
      //Request the URL
      var urlRequest:URLRequest = new URLRequest(serverFile);
      //Assign data to URL
      urlRequest.data = postVariables;
      //Tell flash what method to send Data
      urlRequest.method = URLRequestMethod.POST;
                //Open new page and pass URL and Varaiables.
      catch (event:Error)
                trace(this + (event));


      I need to achive this funcinality with as2 and here is what i have tried, but does not seem to work.


      on (release) {
          var myLoadVar:LoadVars = new LoadVars;
          myLoadVar.GuestUserKey = 'myKeyInfo';
          myVars.send("https://www.mypath.net/myphpfile.php", myLoadVar, 'POST');



      also, I have no control over the php file