Simple flash AS3 contact form with field validation

This is an example of how AS3 aint all that bad.
I simply converted an already existing AS2 contact form to AS3.
Looking at the fla you will see that not much has changed.
The only major difference is how you setup sending your vars to the php script.
An example can be seen here.

I have also attached a working fla with php script.
Download AS contact form Version 0.1

Need a custom contact form built?
Feel free to email me

Tags: , , , , , ,

159 Responses to “Simple flash AS3 contact form with field validation”

  1. Confused-scious Says:

    um… i appreciate the form and flash files and php, but where’s the AS 3.0 to make this form work?

  2. Confused-scious Says:

    nevermind… found it nested in the movieclip – thought it would be on the main timeline.
    thanks!

  3. Mark Says:

    Hi, thanks for offering the code. Having trouble though.

    I’ve uploaded it to my server which has I’ve tested and is confugured for php, i’ve placed the files in the same folder on the FTP.

    I’ve done nothing to the code bar enter my email address & when I submit the form it hangs on the “Submitting Form Please Wait” message, and no email is received.

    Any ideas? Cheers. Mark

  4. [Paul Ferrie] Says:

    Point your browser to the php script and see if any errors are ouptut.

  5. Mark Says:

    When ran in the browser it says “Email address not found”. If I haven’t posted back by the time you read this I’m still struggling!

  6. [Paul Ferrie] Says:

    Hmmm… well the script is recognized and is doing what it is upposed to.
    Can you email me the link to where you have it setup?

  7. [Paul Ferrie] Says:

    Is that windows hosting your on?
    It maybe that your php ini default email address does not reflect the email address you trying to use.
    I do a lot of php work on windows server system and generally find that php can be somtimes a bit funny with mail().

    What would normally work on a linux based server would not always work on a windows based server with php installed.

    Can you confirm what server your hosted on.

  8. [Paul Ferrie] Says:

    Testing you page i get 404 on the php script.
    Have you definetly uploaded swf and php script to same dir?

  9. Mark Says:

    Yep, I’m hosted on a windows server with easyspace

  10. Mark Says:

    And yeah, swf & php are both in my /Images folder – is it worth moving tehm both up a folder to the same page as the aspx?

  11. Mark Says:

    Ha – just moved them up a level & it works. Unbelievable

  12. Mark Says:

    Thanks for the form & for looking into the prob for me Paul, muh appreciated – all working & happy now!

  13. [Paul Ferrie] Says:

    ok so your pulling your swf from a sub-directory and displaying it in a page on your main directory. Flash will still think it’s in the sub-directory even though it’s being viewed in a page on your main directory(root).
    Usually what i do with my swf’s is to have them all in my root directory and then there assets in sub directories of the main.
    example:
    httdocs/root/
    -index.html
    -someswf1.swf
    -someswf2.swf
    -images/
    -images/image1.jpg
    -images/image2.jpg
    -xml/
    -xml/somexml.xml
    -php/
    -php/some.php

    As you can see i store my swf assets and site assets in sub-directories of the root folder.

    Put your swf,php in the same directory of the page it’s embedded in and try again.
    most probably that will be the issue.

    if you dont want to go that route then you can jusat direct link to the php script in the swf.
    Open the fla and go into the form mc. Select layer1 and open the as panel.on line 3 you will see:
    var req:URLRequest = new URLRequest(“contact.php”);

    Replace the “contact.php” with the full url to the php script
    var req:URLRequest = new URLRequest(“http://www.somedomain.com/php/contact.php”);

    let me know if you have any problems

  14. Mark Says:

    cool, all sorted – but i tell ya, you’ll get some people with the same prob as me landing on that post you just did above – cos I found nothing else like it in my searches! thanks again. mark

  15. steve Says:

    any where i can test my form out? and see if it works?

    Or do i have to be on a server
    cause hwen eve ri test it out, it never works =( says Error

  16. [Paul Ferrie] Says:

    Does your server support php?

  17. Benjie Says:

    Thanks for the script and the files. They are a big help. I was able to get the contact form set up and I can get it to send an email, but it looks like none of the items you fill out are posting to the php script. Would this be a problem in the AS or in the PHP? ANy help would be appreciated.

  18. [Paul Ferrie] Says:

    Have you made any modifications to the files?
    It should work striaght out the box as long as your server supports php and you have also set a valid email adress in the php script.

  19. Benjie Says:

    I did modify the code slightly to include a company name field and on submit to gotoAndStop on a custom second frame that displays a thank you message. It’s just strange that some of the information is coming through but nothing that they fill in.

  20. [Paul Ferrie] Says:

    i can tell you that the files are working correctly. You must have deleted or moved something you shouldnt have. Why create a second frame for a thank you as well? I already have that in place.

  21. GJL Says:

    Hello Paul,

    Thanks for this nice as3 contact form. After tweaking some of the graphics I just copied it onto my simpel flash portfolio I am building and it is working 100%

    Thanks alot.

  22. ri Says:

    hello paul,
    thank you for the very helpful posts and info.
    i have a question about this contact form, and the strange behavior i’m seeing, and perhaps its related to what this guy above was seeing a few weeks ago…
    the short of it is, the emails received only display the very first line entered into the “txMessage” input field…
    the only way i’ve found to get the entire message to show up is to type continuously on one line without using any carriage returns…
    thanks a million in advance, this contact form has saved me several migraines and lots of time!
    r
    i

  23. [Paul Ferrie] Says:

    Make sure the txMessage field has multiline set.

  24. diane Says:

    How much would you charge to customize the AS3 contact form to mimic the one on this site:

    http://www.*******.com/contact.html

    Thanks!!
    Diane

  25. name Says:

    simply beautifull,lots of black/cold guiness to you

  26. Dieter Says:

    Hi,

    I have tried to use the code, but when i test the form i always get the ERROR SENDING MAIL message…

    What can i do about that?

    greets

  27. [Paul Ferrie] Says:

    It sounds like you have either not uploaded the php script or your server does not support php.

  28. Dieter Says:

    Ok thanks it works…

    But i have still one little problem I can not input the @ sign in my fields, because my shift btn does not work online at the contactform…

    Do you know why this happens?

  29. [Paul Ferrie] Says:

    Make sure wmode is not set to transparent in the embed code of the html page.

  30. Dieter Says:

    I can’t find that wmode… is it in flash or do i have to change that somewhere else.. I have embedded all inside flash, but that was not the problem…

  31. [Paul Ferrie] Says:

    Can you post a link to your flash contact form?

  32. Dieter Says:

    and the problem is just in FF not in IE…

  33. Dieter Says:

    i have solved it

    Thanks for all the help!

    :)

  34. [Paul Ferrie] Says:

    How did you solve it so that others may learn.

  35. Dieter Says:

    publish settings > html> window mode

  36. devyani Says:

    when i test the html page with the swf embedded, i get this error:

    Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
    at Error$/throwError()
    at flash.net::URLVariables/decode()
    at flash.net::URLVariables()
    at flash.net::URLLoader/onComplete()

  37. [Paul Ferrie] Says:

    Did you change the path to the php script?

  38. devyani Says:

    the php file is in the same folder as the swf. still the errors popping up :(

  39. [Paul Ferrie] Says:

    You may need to update the path to the php script in the fla and republish

  40. hank Says:

    thanks a million!

    this is the ONLY online flash email form tutorial that works for me, and I’ve been searching for a php script that actually works for a very LONG time!!

    to those of you who were lucky enough to stumble upon this site, you have no idea how lucky you are!

    now I have my very own email form that runs like a dream, I am sure it’s gonna help me get more clients now that they can just request information directly from my form, thanks again for this truly wonderful tutorial!!

    -hank

  41. Will Says:

    I am working on a client site to try an get her contact sheet up and running. I am new to flash, but started on AS 3.0 because I know 2.0′s gonna get phased out some day. Everything seems to work up until the sending part. I hangs stating that it is sending the message please wait. I have modified the code to remove the gender part. Took that part out of the .php file. Her hosting is a 1 and 1.com site so I know they are Linux based and offer PHP, i just have no clue how to ensure that her PHP options for email related programming is working. I dont know a thing about .HTML or .PHP – just how to plug and swap values in notepad. Anyone have any clue of what I am doing wrong? Her directory on file Zilla looks like this: these are folders–>[]
    []… <—this goes to the server
    []_db_import
    []aspnet_client
    []db
    []logs
    []sss <— ALL of her website files are here [swfs,htmls,phps)

    The folder called “sss” contains the swf files and the index.html file to make the site run. This is also where I have stuck the contact.php file, which the flash obviously recognizes because it plays just fine. I just cannot send. Please share what you know, if anyone has the time. Thank you SO MUCH for this upload. It is a life saver – now if I could just get it to work….

  42. [Paul Ferrie] Says:

    If you can upload you fla and php script i will take a look and see whats going on.

  43. Alex Says:

    hey thanks a lot for the file!
    but ive got the same problem as will?! although i have entered my email into the php- file correctly as far as i know, it keeps hangig at the loading- animation…
    both files are in the root directory and im not the webhost but i know that the server does support mysql, so it will support php, wont it?
    it would be great if u could take a look at it.. fla is online as well(contactform.fla).
    thanks a lot!alex

  44. [Paul Ferrie] Says:

    You need a cross domain policy file on the server that host’s the php script.
    swf and php script are on different servers

  45. Mareks Says:

    Hi, Paul.

    I have tried your e-mail form, but i can’t get it to work. I am getting the error sending mail straight away. The server is runing linux and it is php enabled. Any sugestions mate? I am new to this game but very anxious to get this thing running.

    Thanks in advance Paul!

  46. [Paul Ferrie] Says:

    Can you post your fla and url to the php script.

  47. Mareks Says:

    What Do mean by that?

  48. [Paul Ferrie] Says:

    zip you fla and post a link to it here so that i cna download it and take a look and see what’s going on.

  49. Mareks Says:

    http://www.autobaltic.ie/e-mail.zip

    Thanks for doing that for me!

  50. [Paul Ferrie] Says:

    line 14 in the php script:
    $to = “admin@yourdomain.co.uk”;
    Have you changed this to the email address you want the mail sent to?
    I did a quick test and was able to submit the form. No errors reported.

  51. Mareks Says:

    Sorry.

    That wasn’t my modified php file, my mistake. The other one was on the server. Try now.

    http://www.autobaltic.ie/e-mail.zip

  52. Mareks Says:

    I can see it’s working for you! I Just got an e-mail

  53. Mareks Says:

    What am I doing wrong?

  54. [Paul Ferrie] Says:

    Where is $msgPost;
    being set?

  55. Mareks Says:

    Where do i set it?

  56. [Paul Ferrie] Says:

    Your the one that modded the script. You tell me where you set it/.

  57. Mareks Says:

    Do you mean the line 18 in the php script?

  58. [Paul Ferrie] Says:

    yeah!
    Where is $msgPost coming from?

  59. Mareks Says:

    I don’t know, i haven’t touched that line, wouldn’t know what to put there anyway.

  60. [Paul Ferrie] Says:

    ok can you re-post your source fla and php script please.

  61. Mareks Says:

    http://www.**************

  62. [Paul Ferrie] Says:

    CS3 please.

  63. Mareks Says:

    http://www.**************

    Sorry

  64. [Paul Ferrie] Says:

    yeah man the source please!
    i cant do anything with a swf

  65. Mareks Says:

    http://www.**************

    Sorry, i am all over the gaf this morning, have a flu.

  66. [Paul Ferrie] Says:

    You where sent here to test me! weren’t you!
    Where on your server is the php script? so that i can call it from this end.

  67. Mareks Says:

    Yeah, by the Lord Allmighty! :)

    http://www.********

  68. [Paul Ferrie] Says:

    ok it seems to be working fine for me. it must be an issue with you using flash CS4

  69. Mareks Says:

    Right, i did moved all the files in the root directory including AC_RunActiveContent. All files cs3 based and it worked. I am now able to send the e-mails. Case closed.

    You are the Man.
    Very much appreciated, Paul.

    Thanks very much.

    Can i put your link in my site as special thanks to?

  70. [Paul Ferrie] Says:

    T.G :)
    Yeah sure you can :)

  71. Mareks Says:

    Just a quick question Paul. I have to convert my flash cs4 website into cs3, since i want that e-mail form in it. Everything is going well untill the moment when in cs3 Dynamic text fiels on the screen appears in white background, i dont understand why. Static text apears as it should be – with transp. background. Any sugestions?

  72. [Paul Ferrie] Says:

    check the properties of the textfiled and make sure that “show border around text” is not selected.

  73. Mareks Says:

    Good Man! Cheers!

  74. neil Says:

    Hi and thanks for a great contact form, works a treat. I have a problem trying to change the font of the text which appears after the form has been submitted ie while the php is working…eg
    “please wait…” “form submitted”

    Can’t find it anywhere. Everything else is fine. Once again thanks and grateful for any help. Best wishes Neil

  75. [Paul Ferrie] Says:

    It’s there…

  76. neil Says:

    Oops. amazing what you see when you look hard enough. Found it now, thanks. Forget the above post, except the part that expresses my thanks.
    Cheers Neil

  77. Sagar Says:

    Hii All..
    My name is sagar.im working as a visualizer.i designed one flash website recently.in that website there is one contact us form where people can submit there comments and details.im not so good in PHP. but with the help of some php tutorial i did something.i did the testing in a linux server its working fine in Linux server.but when i updated that in the client’s server which is windows it not working.it says (Waiting for http://www.websitename.com) can any one help me?please

    (i an including the link http://www.sagarenas.com/mail.zip where u can download the zip file which contains email.php and index.fla file)

  78. [Paul Ferrie] Says:

    Does the windows server have php installed?

  79. Sagar Says:

    Yes the providers said both asp and php are enabled in the server.

  80. [Paul Ferrie] Says:

    check what the default email is in your php.ini file

  81. Sagar Says:

    Sorry i dont know anything about php.ini file..where is that file located?

  82. [Paul Ferrie] Says:

    Looked at your files.
    Sorry i can only advise on files i have created.

  83. Sagar Says:

    ooh ok..anywys thanx for your reply

  84. MikeB Says:

    Hey Paul, I’m having some trouble with your contact form. I placed the mc in my flash file and linked the url request directly to the contact_parse on my server. I also changed the $to to my email address. My server is php enabled and it seems to work fine. Processing then the Thank You message yet I never get an email. Any help you could give me would be greatly appreciated. -Mike

  85. [Paul Ferrie] Says:

    Can you email the files to: paul[at]scotflash[dot]co[dot]uk

  86. MikeB Says:

    The files are 80mb so Im going to upload it to my server so you can download it from there. The contact form movie clip is on frame 20. I do apologize for my .fla being unorganized; more focused on this contact form atm. Thank you so much.

    http://www…./~mbearden/goldsmith.zip

  87. Allan Says:

    Brilliant stuff…

    Thanks :-)

  88. Nidhi Says:

    I am using this script for my flash website. And I am stuck. I am getting error with the Send button.

    Code in the script says:

    //————–Set up form buttons

    send_button.addEventListener(MouseEvent.CLICK, sendForm);
    send_button.txTitle.text=”SUBMIT”;

    My Question:

    Where is txTitle in the flash Contact form? The error I get is “Access of undefined property send_button” and shows the about two lines in the source.

    Please help! Thanks

  89. Nidhi Says:

    Oh my god! Can you guys believe this? I solved the errors and it is working all good. Horray!

    Thanks

  90. Bouwe Says:

    Hello,
    The form is working very well, thanks for that. But i have one problem. when i recieve al mail, there are allot of brakes to read. Can i change this?

    Thank you for helping me.
    Greetings

  91. [Paul Ferrie] Says:

    allot of breaks?

  92. 3 Contact forms, 3 Sizes AS2/AS3 | Life of a Glasgow Flash Developer Says:

    [...] the Simple flash AS3 contact form recently seeing over 5000 downloads I’ve decided to add a new [...]

  93. Alan Says:

    Hi Paul,

    Magic tut buddy, nice work.

    Was just wondering if you knew how to collect the vars if thet are over several frames. Basically Ive expanded your form and have to many fields to fit on one sheet so I split it up into 6 frames with differant fields. I cant for the life of me work out how to collect the field veriables and then post them once im at the end of the form.

    Any help would be greatly appreciated.

    Thanks

  94. [Paul Ferrie] Says:

    I have one available for purchase here that does that. Hope it’s of some help.

  95. Steven Says:

    Hello,

    How do I change the font used on the buttons? Also, could you tell me how to get rid of that background after the form has been sent?

  96. [Paul Ferrie] Says:

    Double click on the button and you will be able to select the textfield and choose a different font.

  97. bhaskar Says:

    i have downloaded the file. was trying to put stuffs into my website. actually i dont need so many form details. i just need a email field so that user can put their email and click on send button and i get the email address in my email address.
    i tried tweeking the code so as to remove the code for all other text fields.everything is fine but i get an error :

    1120: Access of undefined property mcLoader.mcLoader.gotoAndPlay(2);
    1120: Access of undefined property mcLoader.mcLoader.gotoAndStop(25);
    1120: Access of undefined property mcLoadermcLoader.gotoAndStop(1);

    i have seen in the library there is an empty mcLoader symbol.but am not able to figure out where it is and how is it useful?? can u please help?

  98. bhaskar Says:

    ok i figured out what mcloader is..and i put it in the same movieclip which contains the email text field and send button. but still i get the same error message.

  99. [Paul Ferrie] Says:

    Can you send me your fla?

  100. Tesa Says:

    Great! But what about two checkboxes selected (“(9am-12noon”, “3pm-6pm” ) best time to call and 4 radio buttons selected one (“Home”, “Work”, “Fax”, or “Mobile”) phone to be validated on simple Flash AS3 contact form using UI components? How? I get errors—looping form!!!

  101. Ricky Says:

    Cool!!, I have found another simple Flash AS3 code for flash contact us form may be you guys would like to have look on that.

    http://www.msinghinteractive.com/blog/?tag=as3-contact-us-form

  102. Steamin Says:

    It works until I try adding fields that were not in your original FLA. For example, I removed the gender inputs and added a “Phone Number” field to the form, and modified the AS3 and PHP accordingly. After submission, it just hangs on “Sending…”. I’ve been racking my brain for a solution but I can’t figure out why this error is occuring. Any guidance?

  103. [Paul Ferrie] Says:

    Can you send me your fla please?

  104. Steamin Says:

    Actually that won’t be necessary. I made a new PHP file from scratch and got it working how I needed it to (not saying yours doesn’t work well, I just needed to go thru it line by line). I appreciate the speedy response though. And thanks for sharing your code, I wouldn’t know where to start on A LOT of things if it weren’t for people like you. Keep up the good work.

  105. dave Says:

    does this support mail sendin to gmail?

  106. [Paul Ferrie] Says:

    The server config dictates what email address the form will send to not my script. Some servers will only allow you nto send me to a email address linked to the domain where the form is hosted.

  107. Vapn Says:

    Hi,
    I am currently creating my website at google. I am using flash but can not create contact form as google does not allow php script.
    Is the anyway in which I can use contact form by using other server for hosting php file. Ur help is highly appreciated. Please keep in mind I am not very familier with flash but I can follow instruction and find my way around.

    Many thanks
    vapn

  108. [Paul Ferrie] Says:

    Yes you can use another server hosting the php script. As long as the other server has a crossdomain.xml file on it then there should be no problems.

  109. vapn Says:

    thanks for your advice,

    Is it possible for you to suggest any free server which allows cross domain and also allow for php hosting (for contact form only)

    many thanks,
    vapn

  110. [Paul Ferrie] Says:

    No i am sorry i don’t know any that are free.

    I did a search for “Free php hosting
    Hope it is of some help.

  111. vapn Says:

    paul,
    many thanks for your time and help
    regards,
    vapn

  112. Andrew Curran Says:

    Hi Paul,
    First of all thanks for this excellent contact form, and especially giving it away free to a numpty like me!!

    I’ve successfully added it to my flash website, and it works without any problems. However, if a user selects fullscreen mode, they can’t enter text in any of the text fields. I’ve come up blank with the reason for this, perhaps you can help?

    Have a look at a draft of my site here to see what I mean: http://www.thepictureprinciple.com/flash/index.html

    Thanks

    Andrew

  113. [Paul Ferrie] Says:

    Hi Andrew.
    There is limited input for flash in fullscreen mode. You an read more about it here.
    There is no work around.

  114. Luciano Says:

    thanks a lot man! Great job!
    best regards,
    Luciano

  115. Bianca Says:

    Hi Paul,

    thanks a lot for this. Unfortunately it isn’t working for me :( . The emails are submitted, but I never receive any of them.

    I just used your form and put in my email adress. Do you have any idea what I could do?

    Thank you very much

    Bianca

  116. [Paul Ferrie] Says:

    Did you add your email address to the php script

  117. christophe Says:

    hey thanks a lot this works like a charm!!! indeed first working contact form i encounter!

  118. :.aki.: Says:

    I’m no pro with this flash mail form stuff.
    Everything seems to work fine BUT:

    I get the message to my inbox but I can’t reply to the user because the mail form doesn’t forward the users email address.

    Am I missing something?

  119. [Paul Ferrie] Says:

    Would you be able to email me over the files your working?
    My script does forward the user’s email address.
    All you have to do is hit reply to the email.

  120. eneftze Says:

    Hi,

    I`m loving the form and the flexibility it has. It`s really easy to decorate it the way i want. Exactly what i needed. I`m having a question that concerns more the flash itself. Is it ever possible to make the message textfield not starting from the second line. It`s a problem I`ve been digging for a long time now, and if there is someone here to tell me the secret, i`d be one of the happiest humans on the planet. Thank you

  121. [Paul Ferrie] Says:

    Hi there,

    Set txMessage.text=”";
    Just below txMessage.tabIndex = 2;

  122. jimmy zone Says:

    This works great! thanks, I learned a bit of this

  123. Martin Says:

    I finaly found out that i need to change wmode to window, but now the problem is that i need the flash to be transparent. is there a way to change to transparent WITHOUT missing the characters from my norwegian keyboard??

  124. [Paul Ferrie] Says:

    Sorry not to my knowledge

  125. Mareks Says:

    Can you tell me, please, what version php is used?

  126. [Paul Ferrie] Says:

    It should work with any version. Script has been tested on a server with php4 and php5

  127. Martin Says:

    But why does it have to set it on non transparent, do you have any idea of how to fix the problem. couse now I can not input the @ sign in my fields, because my shift btn does not work online at the contactform…

  128. [Paul Ferrie] Says:

    It’s not a problem it’s just the way it is. Also you might want to double check paths for your swf

    http://www.lysglimt.no/flash/lysglimt_flash-web.swf
    404 not fond at this location.

  129. Dokt Faust Says:

    Hi,

    i have one error with the txTitle and i don`t found it.

    please help me.

    thanks

  130. [Paul Ferrie] Says:

    The files work as is. Without seeing the source and seeing what changes you made i can’t help with your error.

  131. GuitarGuy Says:

    Hi Paul,
    Your Form is awesome. Thank you for doing this.

    The only issue I have is that I can easily add new fields to my form and alter the ActionScripting. When I test it, it works fine but the fields end up being required. If I don’t fill out those extra fields the form won’t go through.

    My Example:
    //————–Validate fields and submit form
    variables.senderHandle = txNickname.text;

    –If I add this new field to the varialbes the form works fine but it has to be filled out. If it’s not filled out on the form the form won’t go through. So I just want to make it optional.)

    –I am not even adding the new variable to the “txErrorCheck” coding.
    So i figured if I don’t put it in this part of the code… the field can be left blank and not checked for an empty area.

    So my question is can you tell me how to add at least one non-required text field to the ActionScripting side of the code??
    So it can be left blank on the form…

    I can figure out how to add more if I just have one example…

    Thanks a million..

  132. GuitarGuy Says:

    Sorry, i didn’t type my example properly.. it should have been..

    My Example:
    //————–Validate fields and submit form
    variables.senderNickname = txNickname.text;

    Thanks.

  133. [Paul Ferrie] Says:

    All you need to do is remove the validation check on the txNickname field.
    I am assuming that you have added the relevant code to accommodate the new field?

  134. Trever Says:

    Hey Paul,

    I was reading over this and it seems you know quite a bit. I’ve read up on some AS3 to PHP scripts for email sending.

    I have a PHP script that i currently use to send emails from a html form, but i want it to work for my SWF form now. I get no errors when compiling the flash form.

    When i click the submit button. It just sits there. I don’t receive an email or anything, i don’t have a validation for anything, but i figured that wasn’t needed to just get this form going.

    any ideas? if you need i’ll post my .fla and php scripts aswell.

  135. [Paul Ferrie] Says:

    Yeah I would need to see your fla and php script before I would know what’s going on.

  136. Trever Says:

    FLA & PHP

    you might have to ALT click the link….

  137. Trever Says:

    Thanks Paul

  138. [Paul Ferrie] Says:

    link not working

  139. Trever Says:

    ? when i alt click it or shift click it it’ll download for me.

  140. Trever Says:

    oooo hrmmm invalid or corrupted.. haha

  141. Voodew Says:

    Hey Paul, was wondering if you had an idea of what might be causing that issue that Trever posted.

  142. [Paul Ferrie] Says:

    unable to comment without seeing the files.

  143. Voodew Says:

    lmao.. Gotcha..

    Well here are the codes

    http://www.kirupa.com/forum/showthread.php?t=346599

    I posted them on there. ;)

  144. amithraj Says:

    great work

  145. richard Says:

    Hi

    I have a flash pages on line and need to add the code for the form , hope you can help me.

    thanks
    r

  146. [Paul Ferrie] Says:

    Hi,
    Can you give some more information please?

  147. jonny da pigg Says:

    mate, i’ve been through so many of these tutorials and downloads looking for one that works. having to change bits here and there with no success (normally things labelled as3 when they’re as2)
    this one did first time!
    nice one and ta for sharing

  148. rand Says:

    this works awsome, im trying to add a combobox with some data in it where i nput the values through the component from within the ide at design time but i can’tseem to get a basic combo box values to be included in the mail.
    if anybody can help with a basic combo box i would really appreciate it.
    tnx

  149. [Paul Ferrie] Says:

    If you send me your fla i will take a look.

  150. rand Says:

    k! i finally got it nice mail script heres what i had to do incase anyone else needs it.
    1: i created a crossdomain.xml for goddady
    2:flash combo
    program.addEventListener(Event.CHANGE, ShowSelectedItem);
    }
    function ShowSelectedItem(event:Event):void {
    hidtext.text=program.selectedItem.label;
    }
    added to contact.php
    $senderhidtext =$_POST['senderhidtext'];
    then added to the message being sent.

    tnx so much for this awsome flash file code

    sending mail within godaddy has issues so created the crossdomain.xml and works 100%

  151. Steve Says:

    Hi Paul,

    Thanks for the form. It works quality. I have hosting with 1 and 1 and got it to work perfect 1st time so I must thankyou.

    However, I am also using hosting with Freedom 2 surf. I have changed nothing and can’t get it to work!

    I have contacted them and they have a linux server and PHP is supported and the PHP file can be anywhere on my server.

    I have read some comments above about putting the full path to the PHP in my flash file and tried loads of different things but still no joy.

    Hope you have some advice.
    Cheers
    Steve

  152. Paul Ferrie Says:

    Hi,

    Some server configurations require the email address used to send the email in the form is that of the same domain name the script is on.
    so for example you might have it set up like
    http://www.somedomain.com and in the script you have random@email.com. some servers don’t like this.
    If this is what your doing then try adding ini_set (“sendmail_from”,”your@email.com”);
    Obviously changing your@ for your own email.

    If this is not the case can you send me a direct link to the php script on the server. DO NOT paste the link into the post. Email it to me via my email form.

    Regards,
    Paul

  153. Steve Says:

    Hi Paul,

    Thanks for your comments. I have just sent you a link to my php file on the server.

    I am new to PHP and not sure about the ini_set….

    Hope you can help.

    Thanks
    Steve

  154. Steve Says:

    Hi Paul,

    Thanks for your email. please see this link

    http://www.freedom2surf.net/help/webhostingtechfaq.php

    Hope you cans shed some light!
    Steve

  155. Steve Says:

    Hi Paul,

    Thanks for all your help yesterday. I am not getting loads of emials coming through but the flash file remains on the screen ‘sending mail…’

    It doesn’t get to the form submitted part!

    Hope you can help.
    Steve

  156. Paul Ferrie Says:

    Change the path in the fla from http://www.yourdomain.com/contact.php to just contact.php

  157. Steve Says:

    I Now get the error message but the mail still comes through!

  158. em Says:

    I’ve been racking my brains out since yesterday and still no ideas are coming. people have been helping me and giving me bits of codes but still, nothing works…

    but this is PERFECT! finally got it to work . . .

    thanks a lot for sharing . . .

  159. Paul Says:

    Mate – a big big thanks to you!! I’m new to AS3 and I needed to see some working code so I could debug a simple form I’m working on. (Well, it was supposed to be simple…) Cheers for the headsup – from a fellow Scot in Australia!

Leave a Reply