3 Replies Latest reply on Apr 15, 2008 9:49 AM by kglad

    Help me please!!!!!!!!!

    HMC001
      Hi,

      Thank you in anticipation for reading my post and hopefully someone can help me. I've taken days to try and learn how to do this and I'm having problems.
      I'm trying to set up a flash form which when filled in by user is then sent off to a php script to email results back to me.

      It starts by clicking a button on the main page to bring up a fla. file called "callback.swf". "callback.swf" then relates to php script. I hope I'm explaining this ok. So basically, 2 fla. files and 1 php script. The problem is that
      on the index page, when the button is pressed, the callback.swf appears but doesn't work i.e., the send button when clicked does nothing but the 'close'button I made does work.
      In the 'callback.swf'. - the close button doesn't work but everything else does. Where am I going wrong?
      On the 'callback.swf' I'm trying to capture name,tel,company,email,message and have 3 radio buttons (which when chosed sends the correct one)- I hope that my script is right, could someone please check and let me know.
      On the index fla. I have a button which has the following script on it :

      on (release) {
      _root.createEmptyMovieClip("area", 1);
      loadMovie("callback.swf", "area");
      setProperty("area", _x, 254);
      setProperty("area", _y, 8);
      }
      In the callback.swf.
      I have several layers, on the action layer, there are 2 frame names 'error' with the code
      tryAgain_btn.onRelease = function() {
      gotoAndStop(1);
      };
      and 'confirm'.
      On the first frame, the following action is placed.
      stop();
      var sendData:LoadVars = new LoadVars();
      var opt = radioGroup.selectedRadio;
      //Adds conditional logic for the submit button that validates user input
      submit_btn.onRelease = function() {
      sendData.name = name_txt.text;
      sendData.tel = tel_txt.text;
      sendData.company = company_txt.text;
      sendData.email = email_txt.text;
      sendData.message = message_txt.text;
      send.opt = radioGroup.selection.label;
      sendtime.time = opt.label;
      sendtime.send("callback.php","confirm","POST");

      if (name_txt.text == null || name_txt.text == ""
      &&tel_txt.text == null || tel_txt.text == ""
      &&company_txt.text == null || company_txt.text == ""
      &&email_txt.text == null || email_txt.text == "")
      {
      gotoAndStop("error");
      } else {
      gotoAndStop("confirm")
      }
      };

      Thanks and I hope someone can help as I'm now in despair!!!!!!!!!!