Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 19th, 2004, 08:55 PM
SamChan SamChan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 2 SamChan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old January 19th, 2004, 10:08 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
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.

Reply With Quote
  #3  
Old January 19th, 2004, 11:31 PM
SamChan SamChan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 2 SamChan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #4  
Old January 19th, 2004, 11:54 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Submit Buttons in Flash 2004 MX


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway