Invalid Position
Introduction
Please note that this tutorial contains walk through images and they are referred
to, in the tutorial, throughout.
This guide endeavours to abandon the UI components of Flash 6 as your form
elements, and instead create your own. Which, as a designer, is the purpose
of web design! This tutorial is designed for Flash MX but the Actionscript will
work in earlier versions.
This guide will take you through the steps of creating your form elements,
and having the form submit to a CGI form mailer. The example I am using here
is the ?FormMailer?, a free CGI script, widely used, and available
free at Matt?s Script Archive!
This tutorial is split into three sections:
Making the form
Adding the variables
Adding the Actionscript
Don?t worry if this doesn?t make sense to you yet ? it will
as the tute progresses! Let?s go.
Setting up
So many people decide against creating forms in Flash. The main reason for this
is that script types such as CGI, written in Perl are designed to pass information
between HTML pages, not Flash documents. This means that often the difficult
arises when the CGI form sends information back to the flash document ?
you often either have to open a new page or have the Form Mail page replace
your movie. For this exercise we?re going to assume that you do not want
information from the Form Mail script passed back into Flash.
However, the problem arises when you consider that in most form mail scripts
there is some sort of ?redirect? variable, which often must
be defined. This is the page which the form script sends the browser to if the
submission was successful. To get around this in Flash, the best way is to contain
your movie in frames.
By using a split top and bottom frame, and housing your movie in the top frame,
you can name the lower frame something like ?lower?. Then, later
on, you can specify the form to load the confirmation page in the ?lower?
frame. You can either make the frame so small that the user is unaware that
a confirmation page has been loaded or have the confirmation page that loads,
identical to the one which was there previously. Now that you have set up your
provisional layout for the movie, onto the form creation.
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|