|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Submit Buttons in Flash 2004 MX
Hi! I'm not very experienced with Macromedia Flash MX. I've used it a few times but I only changed video into flash.
Well, I read a lot and I have mastered a lot except for one thing. When I was creating forums, I have no clue how to link the submit button to a page that will send the information to my e-mail address. I was reading up on it on this page URL but I find it way to confusing... is there any other way? Plus, I also wanted to know how to create the redirect page after you click send. Any advice? |
|
#2
|
||||
|
||||
|
You'll need a backend script like cgi, php, or asp to collect the variables from your form in flash. The submit button would use either the Get or Post method depending on your backend script. For example:
Code:
button.onRelease = function() {
loadVariablesNum("http://www.your_website.com/email.asp", 0, "POST");
};
The redirect page would be a piece of cake. You could either tell flash to jump to another keyframe or simply use the getURL method to jump to another html page. Here is an asp example: <% name=Request.Form ("name") email=Request.Form ("email") website=Request.Form ("website") message=Request.Form ("message") messagebody="<body background=" &"http://www.your_website.com/background.jpg" & "><br><br><b><font face=Arial color=000000 size=2>Name: "& name &"</font></b><br><br><b><font face=Arial color=000000 size=2>Email: "& email &"</font></b><br><br><b><font face=Arial color=000000 size=2>Website: "& website &"</font></b><br><br><b><font face=Arial color=000000 size=2>Message:</font></b><br><br><b><font face=Arial color=000000 size=2>"& message &"</font></b>" Set mailobj=server.CreateObject ("cdonts.newmail") mailobj.MailFormat =0 mailobj.BodyFormat =0 mailobj.To ="your email goes here." mailobj.From =Request.Form ("email") mailobj.Subject =Request.Form ("subject") mailobj.Body =messagebody mailobj.Send Set mailobj =nothing %> Last edited by jmichels : January 19th, 2004 at 10:17 PM. |
|
#3
|
|||
|
|||
|
Thanks for the info.
However, I'm really not comfortable with flash yet. I'm not sure where to put these codes... I mastered Photoshop and HTML but not this... sorry! Colud you elaborate? |
|
#4
|
||||
|
||||
|
The backend script that you use to collect the form information will really depend on what type of server you are using. For instance php on linux and asp on a windows server.
The long strand of code in my previous post will go in an asp file and run on a windows server. You can customize the script to match the variables in your flash form. This bit of actionscript: Code:
button.onRelease = function() {
loadVariablesNum("http://www.your_website.com/email.asp", 0, "POST");
};
goes inside a keyframe in flash. It works with a button with an instance name of "button." All it really does is initiate the asp file on your server to collect the data from your flash form. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Submit Buttons in Flash 2004 MX |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|