Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stop();
- //this ensures the input boxes are blank
- emailForm_mc.nombre = "";
- emailForm_mc.compania = "";
- emailForm_mc.telefono = "";
- emailForm_mc.email = "";
- emailForm_mc.message = "";
- /*******************set up email form******************/
- //set up function to make send button work
- emailForm_mc.send_btn.onRelease = function() {
- //trace("button works");
- receiver = new LoadVars();
- receiver.onLoad = function(success) {
- //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.
- clearForm = receiver.mailed;
- if (success) {
- //trace("i have loaded");
- emailForm_mc.returnline = receiver.returnmsg;
- }
- //this clears the form if the mail has been sent. It knows to clear because PHP returns 1 through the variable &mailed.
- if (clearForm == 1) {
- emailForm_mc.nombre = "";
- emailForm_mc.compania = "";
- emailForm_mc.telefono = "";
- emailForm_mc.email = "";
- emailForm_mc.message = "";
- }
- };
- sender = new LoadVars();
- sender.nombre = emailForm_mc.nombre;
- sender.compania = emailForm_mc.compania;
- sender.telefono = emailForm_mc.telefono;
- sender.email = emailForm_mc.email;
- sender.mess = emailForm_mc.message;
- sender.sendAndLoad("phpFlashEmailScript.php",receiver,"POST");
- };
Add Comment
Please, Sign In to add comment