Creating a Mail Form with PHP and Flash - Part 2 - Page 11
(Page 12 of 14 )
We are ready to send our form, let's have a quick look at the actions assigned to our send and clear buttons.

on (release) { title = "Please select a title"; name = ""; subject = ""; message = ""; email = ""; tellTarget ("ssl") { gotoAndStop (1); } tellTarget ("coffee") { gotoAndStop (1); } } |
I covered most of this in my previous tutorial but there are a few extra lines of code now so lets look at them.title = "Please select a title";This line sets the value in the title box back to the original message.tellTarget ("ssl") {gotoAndStop (1);}This is why it was important you had to give your movieclip an instance name, because without it this action would not be able to find it's target.This line tells flash to go to and stop on frame 1 of the movieclip ssl which is the frame without any ticks displayed and it also has the following bit of actionscript /:ssl=""; which sets the value of the variable ssl to false(nothing)tellTarget ("coffee") {gotoAndStop (1);}This is exactly the same as above only this time it targets an movieclip called coffee (my coffee question)

The send button has the same actions as before, here is a look at the code but there is no need to go through it
on (release) { if (title eq "" or name eq "" or subject eq "" or message eq "" or email eq "" or ssl eq "" or coffee eq "") { stop (); } else { loadVariablesNum ("form.php", 0, "POST"); gotoAndStop (2); } } |
When the user presses the send button they are shown a Thank you message, along with this all the information they entered is also displayed. let's look at that.
Next: Page 12 >>
More Miscellaneous Articles
More By Codewalkers