Guest User

Untitled

a guest
Apr 26th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. stop();
  2. //this ensures the input boxes are blank
  3. emailForm_mc.nombre = "";
  4. emailForm_mc.compania = "";
  5. emailForm_mc.telefono = "";
  6. emailForm_mc.email = "";
  7. emailForm_mc.message = "";
  8.  
  9.  
  10. /*******************set up email form******************/
  11. //set up function to make send button work
  12. emailForm_mc.send_btn.onRelease = function() {
  13. //trace("button works");
  14. receiver = new LoadVars();
  15. receiver.onLoad = function(success) {
  16.  
  17. //this picks up the vaiable sent from PHP that lets the action script know if the mail has been sent. If it has been sent the value returned is 1 and the form resets.
  18. clearForm = receiver.mailed;
  19. if (success) {
  20. //trace("i have loaded");
  21. emailForm_mc.returnline = receiver.returnmsg;
  22. }
  23. //this clears the form if the mail has been sent. It knows to clear because PHP returns 1 through the variable &mailed.
  24. if (clearForm == 1) {
  25. emailForm_mc.nombre = "";
  26. emailForm_mc.compania = "";
  27. emailForm_mc.telefono = "";
  28. emailForm_mc.email = "";
  29. emailForm_mc.message = "";
  30. }
  31. };
  32. sender = new LoadVars();
  33. sender.nombre = emailForm_mc.nombre;
  34. sender.compania = emailForm_mc.compania;
  35. sender.telefono = emailForm_mc.telefono;
  36. sender.email = emailForm_mc.email;
  37. sender.mess = emailForm_mc.message;
  38. sender.sendAndLoad("phpFlashEmailScript.php",receiver,"POST");
  39. };
Add Comment
Please, Sign In to add comment