Groups | Blog | Home
all groups > flash (macromedia) > july 2004 >

flash (macromedia) : how to create a user text box



lrdezines
7/31/2004 11:39:49 PM
(fresh new user)
I wanted to create a informational form that the voyer (the person viewing the
page) could answer questions by filling in blanks. And when they are done
filling in the boxes, I would like to have a button at the bottom that would
email me their answers. (kinda like a medical history form and I would get the
personal info. emailed to me) I have never used action script and I am very
new to Flash. Can somebody please help me in simple terms?

Thank you for your time and help,
Luke
Ping
8/1/2004 9:24:16 AM
can't you do this with a simple mail form?

Peace

Ping
http://www.pingcreations.nu





"lrdezines" <webforumsuser@macromedia.com> skrev i meddelandet
news:cehak5$odf$1@forums.macromedia.com...
[quoted text, click to view]

urami_
8/1/2004 10:07:22 AM


[quoted text, click to view]


Hello Luke

Well , flash itself can't do it.
You need middle ware like ASP/ PHP or CGI

best if you visit www.flashkit.com/movies and type in search next to
MyMovies link something like "form" or "formmail" or "php"
you should find many samples including the midleware scripts.
Choose one that is supported by your server.
--


Regards


urami_*

<hol>
http://flashfugitive.com/
</hol>


By The way:
If you try to mail me , DO NOT *laugh*
lrdezines
8/28/2004 6:24:44 PM
Urami,
thank you for the timely response. I checked out the "formail" search through
Flash's site and came across a turtorial that sounded like it could help, but
it was written for a advanced action scrtipt user (which I am not) {site
address:
http://www.flashkit.com/tutorials/Dynamic_Content/E-mail_i-Jeffrey_-658/index.ph
p} I was wondering if you know of any other sites or turtorials that might
help me, something that deals a little bit more in laymen terms.

Thank you for your time,
Luke
hasanyasin
8/28/2004 7:54:03 PM
Hi "fresh new user",
As urami_ sayed, flash cannot send emails. So, flash can do what? For you, it
can send variables to a server and receive others... (I suppose you know what
are variables. They are simple boxes that has some value in.)

You will create your form using text tool and selecting Input in the type
dropdown box at the properties panel. Again using properties panel, while your
text boxes are selected, you will name them via the <instance name> box. After
these, you will create a button by drawing with drawing tools. After drawing,
you will select it and press F8. To the box that pops up (Create Symbol Dialog
window), you will say OK. After this, when your button symbol instance (we made
it a symbol instance) and open the ActionScript window. There, you will write
on (release) { _parent.submitForm(); }
This will make our button instance clickable. When users click our button, the
function submitForm(); will be executed. We then select the frame on which our
button lays and on the ActionScript window, we write our function:
function submitForm() {
formvars=new LoadVars(); received=new LoadVars();
formvars.username=the_name_we_entered_for_an_input_box.text;
//it will be finish with .text, it means the text of the box.
formvars.anotherFormElement=_another_textbox_name.text;
//every text box will be inserted into our formvars object...

formvars.sendAndLoad("ourServersAddress/ourscript.php",received,"POST");
//This sends our formvars object to our server script.
}

We have managed to send our form variables to a server script. After it, we
will create a server script to get these variables and send them as an email to
us. We will do this after I eat something. :) I hope, you will have done the
flash side of the job before I came...


AddThis Social Bookmark Button