Solved

Sending a form through flash

Posted on 2006-06-14
12
143 Views
Last Modified: 2010-08-05
I am trying to create a newsletter request box. I need it to take an email address that a user inputs then send it to our company email address. I also want there to be some sort of message that shows that the message has been sent

Thanks
0
Comment
Question by:eli290
12 Comments
 
LVL 9

Expert Comment

by:ddlam
ID: 16909011
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 16909234
Hi,

here is what exactly you want

Flash Based Email Form Using PHP
http://www.kirupa.com/developer/actionscript/flash_php_email.htm

Rgds
Aneesh
0
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 500 total points
ID: 16909239
source files used in above tutorial are also available here:
http://www.kirupa.com/developer/actionscript/fla/Kirupa_flash_php_email.zip
0
 

Author Comment

by:eli290
ID: 16911364
Where does the php file have to be put?
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 16911383
on your server,

if you have installed apache server on your local machine, you can copy it in www. folder for testing

do remember to provide the updated path to flash swf.
0
 

Author Comment

by:eli290
ID: 16911411
I know on the server but which folder? Currently I have my html page directly in the public_html and i have the swf in a sub folder called flash
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 16911505
if your server support php, you can place it anywhere inside public_html..

just update the path according inside swf
and IMPORTANT: use relative path inside swf
0
 

Author Comment

by:eli290
ID: 16911529
Sorry I lost you, where do i set the relative path inside swf
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 16911538
I suggest you just, place php file in the same folder where swf resides..

and use the php name simply as "myphpfile.php"
0
 

Author Comment

by:eli290
ID: 16911579
If at all possible could you look at my source file for it? It is located at www.ctxworld.com/form

Thanks
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 16911664
ok,

1. just place form.php in the same folder where swf will be.
2. textField should be in the same movieClip where button reside, currently textField inside a movieClip.. just select movieClip "email" and press CTRL+B, now you will have button and textField both in same level

3. now assign a variable name to textField.. (not instance name, assign variable name)
select the textField, and Just look for "Var:" in properties panel

rest I hope, php side you know how to handle it.
0
 
LVL 1

Expert Comment

by:Tony_Goodman
ID: 16913561
You could call a .asp file from flash.  In flash, call the file like this:
getURL('Http://www.email.asp');

In you email.asp file, this would be the code:


<%@ LANGUAGE="VBScript"%>
<%Response.Buffer=True%>
<%
'Send email
      Dim objCDO
    Set objCDO = Server.CreateObject("CDONTS.NewMail")
      objCDO.To = "Tony.Goodman@wpafb.af.mil;Tony.Goodman@wpafb.af.mil"
      objCDO.From = Request("Email")
    objCDO.Subject = "IRIS Feedback submitted"
      objCDO.Body = Request("Name") + " submitted the following information:" + space(75) + "Phone: " + Request("Phone") + space(75) + " " + space(75) + Request("Comments")
      objCDO.Send
      Set objCDO = Nothing%>



Hope this helps,
-Tony
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now