Contact forms in Flash (AS3/PHP)

Hello,
I have created a form in flash (CS5) using AS3 and Php.
The test run worked absolutely fine but now I have added the form to my (original) flash movie it has a number of errors come up...
Thing is that I've just spent the last 2 hours trying to get this form to work and having no success what so ever.
So does anyone know what the following complier errors mean and how I can solve this issue?
Scene 1
1152: A conflict exists with inherited definition flash.display:DisplayObject.name in namespace public.
ComponentShim (Compiled Clip), Line 1
5000: The class 'fl.controls.TextArea' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
ComponentShim (Compiled Clip), Line 1
5000: The class 'fl.controls.TextInput' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
ComponentShim (Compiled Clip), Line 1
5000: The class 'fl.controls.UIScrollBar' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
ComponentShim (Compiled Clip), Line 1
5000: The class 'fl.controls.Button' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
Yes, I'm obviously a newbie and still getting to grips with flash so any help would be amazing!
Thank you in advance,
Jos

add those components to the library of your main (ie, loading) fla.

Similar Messages

  • Is it possible to create a contact form via Flash cs5.5 and package out app for desktop?

    I need to create a desktop app for windows.  Im using Flash cs5.5 and I wanted to know of an easy to way to create a simple contact form that would work once installed on a desktop/
    Thanks guys for any input!

    If you want a contact form you can either use StageWebView or HTMLLoader to show an HTML page in your web server with a contact form.
    Or you can create the form with Flash textfields and then send the whole thing with a POST request to a PHP script in the server, for example.

  • Making a Contact Form w/ Flash 5

    Hi,
    I searched the site first and did find a downloadable
    pre-made contact form that works with Flash, but I don't know that
    it will work with my ancient version since it uses PHP to mail the
    form. I use flash for drawing more than anything and don't know a
    whole lot about actionscript. I'm building a new website however,
    and would like to include a flash form for people to contact me
    through rather than email. I assume this can be done with Flash 5
    using some sort of send form action but I could use a little help
    in figuring this one out.
    Thanks

    http://www.flash-db.com/Tutorials/email/

  • How to create a "contact form" in flash builder

    How can I build a "contact form" that will sent an email in flash builder.
    Secondly how do I get it inside Flash Catalyst?
    Does anyone know any tutorials?
    Regards
    Rasmus

    Hi,
    May I please have the URL of the site and any specific pages you'd like me to take a look at? Let me check before suggesting anything.

  • Creating a file on server, using Flash AS3 + PHP

    I have a very simple PHP script that creates a new file on my server using a random number for the file name (e.g., 412561.txt).  When I load the script directly from a browser, it works.  But when I load the script from a very simple Flash (AS3) script, it does not work (i.e., doesn't create a file).  The Flash script and PHP script are both in the same directory.  Permissions on the directory and its content are 755.  Temporarily setting those permissions to 777 does not solve the problem (i.e., PHP still doesn't create file when called via Flash).
    Here is my phpinfo.
    Here is the PHP file.
    The contents of the PHP file are:
    <?php
    error_reporting(E_ALL);
    ini_set("display_errors", 1);
    $RandomNumber = rand(1,1000000);
    $filename = "$RandomNumber" . ".txt";
    $filecontent = "This is the content of the file.";
    if(file_exists($filename))
              {$myTextFileHandler = fopen($filename,"r+"); }
    else
              {$myTextFileHandler = fopen($filename,"w"); }
    if($myTextFileHandler)
              {$writeInTxtFile = @fwrite($myTextFileHandler,"$filecontent");}     
    fclose($myTextFileHandler);   
    ?>
    Here is the html container for the Flash script.  The Flash script features a single button which calls the PHP script when pressed.  In case it helps, here is the raw Flash file itself.  The code of the Flash script is as follows:
    stop();
    var varLoader:URLLoader = new URLLoader;
    var varURL:URLRequest = new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php");
    btnSave.addEventListener(MouseEvent.CLICK,fxnSave);
    function fxnSave(event:MouseEvent):void{
              btnSave.enabled=false;
              varLoader.load(varURL);
    Directory listing is enabled at the parent directory here, so you can see there when a new text file is created or not.  (Um, if this is a security disaster, please let me know!)
    Can anyone please help me understand why this isn't working and how I can fix it?  Thank you
    ~jason

    #1, Yes that is a security risk, please disable directory index viewing.
    #2, Always validate. I see no issue with the code you're using but clearly it's not working. The way you find out is your trusty errors.
    Make a new document (or paste this into your existing) where a button with the instance name btnSave is on screen:
    // import required libs
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.events.MouseEvent;
    import flash.events.SecurityErrorEvent;
    import flash.text.TextField;
    // assign handler
    btnSave.addEventListener(MouseEvent.CLICK, fxnSave);
    // make a textfield to display status
    var tf:TextField = new TextField();
    addChild(tf);
    tf.width = stage.stageWidth;
    tf.height = 300;
    tf.multiline = true;
    tf.wordWrap = true;
    tf.selectable = false;
    tf.text = "Loading...\n";
    // just making sure the textfield is below the button
    this.swapChildren(tf,btnSave);
    function fxnSave(event:MouseEvent):void
        // disable button
        event.currentTarget.enabled = false;
        // new loader
        var varLoader:URLLoader = new URLLoader();
        // listen for load success
        varLoader.addEventListener(Event.COMPLETE, _onCompleteHandler);
        // listen for general errors
        varLoader.addEventListener(IOErrorEvent.IO_ERROR, _onErrorHandler);
        // listen for security / cross-domain errors
        varLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _onErrorHandler);
        // perform load
        varLoader.load(new URLRequest("http://www.jasonfinley.com/research/testing/TestingSaveData.php"));
    // complete handler
    function _onCompleteHandler(e:Event):void
        tf.appendText("Load complete: " + e);
    // error handler
    function _onErrorHandler(e:Event)
        if (e.type == SecurityErrorEvent.SECURITY_ERROR)
            tf.appendText("Load failed, Security error: " + e + " type[" + e.type + "]");
        else if (e.type == IOErrorEvent.IO_ERROR)
            tf.appendText("Load failed, IO error: " + e + " type[" + e.type + "]");
    I get a Event.COMPLETE for mine, so the PHP script is definitely firing. Change the URL to something invalid and you'll see the IOErrorEvent fire off right away.
    That leaves you to diagnose the PHP script. Check your error_log and see what is going wrong. You're suppressing errors on your file write which doesn't help you locate the issue saving the file. If you want to handle errors yourself you should do the usual try/catch and handle the error yourself (write a debug log file, anything).

  • Listbox form using Flash and PHP

    Hi,
    I am trying to create a form that includes listboxes in
    Flash. The datas are then sent to an email through PHP.
    Thing is: i havent found any actionsript to do that with
    Listboxes.
    Can anyone help me?
    Cheers.

    >> Thing is: i havent found any actionsript to do that
    with Listboxes.
    Do you mean List components? There's no special script - it'd
    be the same
    for sending any data to PHP. You just need to use the methods
    of the
    component to first get out the data you want to send.
    Can you be more specific as to the problem?
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Forms in Flash withos PHP or database

    I would like to male an easy mail-form in a Flash-movie. Just
    one line where you can put in you mail-address and then a
    Send-button. Do I have to database/PHP for this? Im not that
    familiar with database-coding.

    No, you don't need a database. You can use something like so:
    var email = theEmail.text;
    getURL("mailto:[email protected]?subject=New web
    email&body="+email,
    "_blank");
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Flash, AS3, PHP, & Query Strings

    I think what I am after is pretty simple but unfortunately, I
    don't know much php. Basically what I am looking for is this.
    I want to pass a query from the browser address to a flash
    document.
    For Example, if someone visits.
    http://www.whatever.com/tour?mls=123456789
    (or tour.php?mls=123456789, whatever is easiest)
    A document opens, resizes the browser (optional but would be
    nice), and loads a flash SWF. It also passes the mls=123456789
    string into flash to a variable mls.
    Any ideas?
    Thanks!
    Drew

    Try: URLLoaderDataFormat.VARIABLES

  • Flash Contact form with Php Error

    Hi again (".)
    I've making this contact form on flash & i got  the script  for the action script but i'm unable to integrate a php script that would send the mail from my form.
    I'm using two input feilds with instance names as theEmail and theMessage
    Would relly appreciate it if i culd get some help on it. thank you so much.
    Here is the action action script code i'm using -
    snd_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
              if (theEmail.text == "" || theMessage.text == "")
                        theFeedback.text = "Please fill in all fields.";
              else
                        // create a variable container
                        var allVars:URLVariables = new URLVariables();
                        allVars.email = theEmail.text;
                        allVars.message = theMessage.text;
                        //send info to a URL
                        var mailAddress:URLRequest = new URLRequest("mail.php");
                        mailAddress.data = allVars;
                        mailAddress.method = URLRequestMethod.POST;
                        sendToURL(mailAddress);
                        theFeedback.text = "Thank You!";
      theEmail.text = "";
                        theMessage.text = "";

    Actaully is i got this Action script from a tutorial and i learnt from it but the mail.php was not part of the tutorial.
    Would you be able to provide me a php script based on the instances names i mention above?

  • Create HTML Contact Form with PHP script

    Hi Everyone
    I have designed a contact form in HTML with PHP script but it doesn't seem to be working. The PHP echo message doesn't appear after I submit the form and the e-mail message is not delivered.  The url address is http://www.dreamaustraliastudytours.com.au/Test/ContactUs.html. Any thoughts would be greatly apprecipated
    Thank you in advance
    Paul

    Hi Ben and Murray
    Thank you for your input on the php script. You nailed the problem on the head. I have up dated the script  and provided it below. I have one more question.
    After the end user submits the form I would like them to be directed to another html file - for example successful.html. Would the code be
    $insertGoTo = "successful.html";
    delete 'Thank you for contacting us. We will be in touch with you very soon.'?
    Once again thank you for your advice
    Regards
    Paul
    <?php
    if(isset($_POST['email'])) {
        $email_to = "[email protected]";
        $email_subject = "New Inquiry";
        function died($error) {
            // your error code can go here
            echo "We are very sorry, but there were error(s) found with the form you submitted. ";
            echo "These errors appear below.<br /><br />";
            echo $error."<br /><br />";
            echo "Please go back and fix these errors.<br /><br />";
            die();
        // validation expected data exists
        if(!isset($_POST['first_name']) ||
            !isset($_POST['last_name']) ||
            !isset($_POST['email']) ||
            !isset($_POST['telephone']) ||
            !isset($_POST['comments'])) {
            died('We are sorry, but there appears to be a problem with the form you submitted.');      
        $first_name = $_POST['first_name']; // required
        $last_name = $_POST['last_name']; // required
        $email_from = $_POST['email']; // required
        $telephone = $_POST['telephone']; // not required
        $comments = $_POST['comments']; // required
        $error_message = "";
        $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
      if(!preg_match($email_exp,$email_from)) {
        $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
        $string_exp = "/^[A-Za-z .'-]+$/";
      if(!preg_match($string_exp,$first_name)) {
        $error_message .= 'The First Name you entered does not appear to be valid.<br />';
      if(!preg_match($string_exp,$last_name)) {
        $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
      if(strlen($comments) < 2) {
        $error_message .= 'The Comments you entered do not appear to be valid.<br />';
      if(strlen($error_message) > 0) {
        died($error_message);
        $email_message = "Form details below.\n\n";
        function clean_string($string) {
          $bad = array("content-type","bcc:","to:","cc:","href");
          return str_replace($bad,"",$string);
        $email_message .= "First Name: ".clean_string($first_name)."\n";
        $email_message .= "Last Name: ".clean_string($last_name)."\n";
        $email_message .= "Email: ".clean_string($email_from)."\n";
        $email_message .= "Telephone: ".clean_string($telephone)."\n";
        $email_message .= "Comments: ".clean_string($comments)."\n";
    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers); 
    ?>
    Thank you for contacting us. We will be in touch with you very soon.
    <?php
    ?>

  • Can you create a form not using a php script?

    I need to create a contact us form on my website using DW and have researched how and understand the easiest way is using a php script.  Unfortuntately, my webhost server does not support this and will charge me an arm and a leg in order to to do it.  Is there another way to have a functioning contact form not using a php script?

    Yes and no.
    You could use a mailto link for your form action instead of a PHP script.
    There are several problems with this method though. First, when you do that, you are at the mercy of the viewer's computer set-up. Mailto links use whatever email client is installed on the machine in order to send the message. Public computers (libraries, colleges, etc) almost never have an email client installed, so when a viewer on one of those machines clicks the link, nothing happens. Secondly, your email address is open for spam harvesters, so you may end up with enlargement and nigerian scam emails flooding your inbox.
    Since your provider doesn't give you a way to do it the right way on your server, you may want to look into email form services online and see if they are less expensive than your current alternative.

  • AS3/PHP Contact Form Problem

    I am working on a contact form in my .fla that utilizes php to send user info to my email address.  I believe I have all of the files in the correct directories, but it is still unsuccessful.  I am not getting any errors in the AS3.  Rather, I think the issue is related to the send_email.php file.  The swf is hosted at http://stephenpappasphoto.com/ and the page in question is under the "Contact" button.
    Here is the AS3:
    import flash.utils.Timer;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import flash.net.URLVariables;
    import flash.events.TimerEvent;
    f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    submitBtn.addEventListener(MouseEvent.CLICK, submit);
    resetBtn.addEventListener(MouseEvent.CLICK, reset);
    var timer:Timer;
    var var_load:URLLoader=new URLLoader;
    var URL_request:URLRequest=new URLRequest("send_email.php");
    URL_request.method=URLRequestMethod.POST;
    function submit(e:MouseEvent):void
        if( f_Name.text == "" || f_Date.text == "" || f_Location.text == "" || f_Email.text== "" || f_Phone.text == "" || f_Budget.text == "" )
            message_status.text = "Please fill up all test fields.";
        else if( !validate_email(f_Email.text) )
            message_status.text = "Please enter a valid email address.";
        else
            message_status.text = "Sending..."    ;
            var email_data:String = "name=" + f_Name.text 
                                + "&email=" + f_Email.text
                                + "&message=" + f_Phone.text
                                + "&message=" + f_Location.text
                                + "&message=" + f_Date.text
                                + "&message=" + f_Budget.text;
            var URL_vars:URLVariables = new URLVariables(email_data);
            URL_vars.dataFormat = URLLoaderDataFormat.TEXT;
            URL_request.data = URL_vars;
            var_load.load( URL_request );
            var_load.addEventListener(Event.COMPLETE, receive_response );
    function reset(e:MouseEvent):void
        f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    function validate_email(s:String):Boolean
        var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
        var r:Object = p.exec(s);
        if( r == null )
            return false;
        return true;
    function receive_response(e:Event):void
        var loader:URLLoader = URLLoader(e.target);
        var email_status = new URLVariables(loader.data).success;
        if( email_status == "yes" )
            message_status.text= "Thank you for your contact information.  I will get back to you shortly.";
            timer = new Timer(500);
            timer.addEventListener(TimerEvent.TIMER, on_timer);
            timer.start();
        else
            message_status.text = "Your message cannot be sent.  Please email your information to [email protected]. ";
    function on_timer(te:TimerEvent):void
        if( timer.currentCount >= 10)
            f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
            timer.removeEventListener(TimerEvent.TIMER, on_timer);
    Here is the send_email.php:
    <?php
    $f_Name = $_POST['name'];
    $f_Date = $_POST['date'];
    $f_Location = $_POST['location'];
    $f_Email = $_POST['email'];
    $f_Phone = $_POST['phone'];
    $f_Budget = $_POST['budget'];
    if( $f_Name == true )
        $sender = $f_Email;
        $receiver = "[email protected]";
        $client_ip = $_SERVER['REMOTE_ADDR'];
        $email_body = "Name: $f_Name \nEmail: $f_Email \n\nSubject: New Client-$f_Name \n\nDate: $f_Date \n\n$f_Location \n\n   Phone: $f_Phone \n\n    Budget: $f_Budget\n\n    IP: $client_ip \n\n";       
        $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
        if( mail( $receiver, "New Client - $f_Name", $email_body, $extra ) )
            echo "success=yes";
        else
            echo "success=no";
    ?>
    Thank you in advance for any advice.

    Try this:
    For the actionscript side, my changes are in italics:
    import flash.utils.Timer;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    import flash.net.URLVariables;
    import flash.events.TimerEvent;
    f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    submitBtn.addEventListener(MouseEvent.CLICK, submit);
    resetBtn.addEventListener(MouseEvent.CLICK, reset);
    var timer:Timer;
    var var_load:URLLoader=new URLLoader;
    var URL_request:URLRequest=new URLRequest("send_email.php");
    URL_request.method=URLRequestMethod.POST;
    URL_request.data = formVariables;
    var_load.addEventListener(Event.COMPLETE, receive_response ); 
    function submit(e:MouseEvent):void
        if( f_Name.text == "" || f_Date.text == "" || f_Location.text == "" || f_Email.text== "" || f_Phone.text == "" || f_Budget.text == "" )
            message_status.text = "Please fill up all test fields.";
        else if( !validate_email(f_Email.text) )
            message_status.text = "Please enter a valid email address.";
        else
            message_status.text = "Sending..."    ;
            formVariables.name = f_Name.text;
            formVariables.email = f_Email.text;
            formVariables.phone = f_Phone.text;
            formVariables.location = f_Location.text;
            formVariables.date = f_Date.text;
            formVariables.budget = f_Budget.text;
            formVariables.subject = "Mail from form...";
            formVariables.recipient = "[email protected]";
            varLoad.load(formVariables);
    function reset(e:MouseEvent):void
        f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
    function validate_email(s:String):Boolean
        var p:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
        var r:Object = p.exec(s);
        if( r == null )
            return false;
        return true;
    function receive_response(e:Event):void
        var loader:URLLoader = URLLoader(e.target);
        var email_status = new URLVariables(loader.data).success;
        if( email_status == "yes" )
            message_status.text= "Thank you for your contact information.  I will get back to you shortly.";
            timer = new Timer(500);
            timer.addEventListener(TimerEvent.TIMER, on_timer);
            timer.start();
        else
            message_status.text = "Your message cannot be sent.  Please email your information to [email protected]. ";
    function on_timer(te:TimerEvent):void
        if( timer.currentCount >= 10)
            f_Name.text = f_Date.text = f_Location.text = f_Email.text = f_Phone.text = f_Budget.text = message_status.text = "";
            timer.removeEventListener(TimerEvent.TIMER, on_timer);
    The php file that you have should work with this actionscript. The variables that you define in the AS, "name", "email", etc, must match the variables that are used in the php. Try it. It may need some additional tweeks.

  • PHP files and Flash contact form

    Hello,
    I am creating a website in flash CS4 and I made a contact form and when I test the site out, I can type and click the submit button, so everything is fine there but it doesn't go to anything. Now I know I need a code to tell the contact form where to go, but I can't find one that works, or I may be doing something wrong.  I also have been reading about PHP but I am not sure what that is. I found a site that said to put this code in the actions panel.
    on(release){
        getURL("http://www.mail.menaceaudio.com", "", "POST");
    The www.mail.menaceaudio.com is the site for the companies email.
    So when I test it out this error comes up:
    1087: Syntax error: extra characters found after end of program.

    The code you show is AS2, not AS3. Try searching for 'as3 form php' and you should find plenty of info.
    PHP is a server-side scripting language. You put PHP files on your server and can then call them from Flash...

  • Using PHP with Flash (contact form)

    I am trying to get a contact form on a flash site to work and
    for some reason the PHP isn't forwarding the message to my email.
    Below is the flash code I have used as well as the document I have
    saved as contact.php. Thank you so much for the help. This is the
    last thing I need to complete for the site and I just can't seem to
    get it right. Thanks.
    Flash Code For the Submit Button:
    onClipEvent (enterFrame) {
    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
    if (this._currentframe<this._totalframes) {
    this.nextFrame();
    } else {
    if (this._currentframe>1) {
    this.prevFrame();
    on (release) {
    this._parent.getURL ("contact.php","_blank","GET");
    this._parent.name = "Your Name:";
    this._parent.email = "Your Email:";
    this._parent.phone = "Your Phone Number:";
    this._parent.text4 = "e-mail:";
    this._parent.message = "Your Message:";
    Here is what I have for Contact.php:
    <?php
    $your_name = $_GET['name'];
    $your_email = $_GET['email'];
    $your_phone = $_GET['phone'];
    $your_message = $_GET['message'];
    $recipient_email = "[email protected]";
    $subject = "from " . $your_email;
    $headers = "From: " . $your_name . "<" . $your_email .
    ">\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1';
    $content = "<html><head><title>Contact
    letter</title></head><body><br>";
    $content .= "Name: <b>" . $your_name .
    "</b><br>";
    $content .= "E-mail: <b>" . $your_email .
    "</b><br><hr><br>";
    $content .= "Phone: <b>" . $your_phone .
    "</b><br>";
    $content .= $your_message;
    $content .= "<br></body></html>";
    mail($recipient,$subject,$content,$headers);
    ?>
    <html>
    <body bgcolor="#282E2C">
    <div align="center"
    style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
    Your message was sent. Thank you.
    </div>
    </body>
    </html>
    <script>resizeTo(300, 300)</script>

    well...that's true..I wanted "name" to be cleared when
    clicked...this version I found doesn't clear "name" when clicked,
    but it needs selected and erased manually...anyway..it's better
    then nothing...
    Reason I want this is because I'm using a design that is not
    giving me much space and I have to trick the low space with this
    option.
    If you want I can send you the fla to get a better
    picture...I believe you deserve it :)

  • Flash and PHP contact form.

    Hi, I created a simple web site in flash cs4 with a contact form, however, when I press submit, no email is sent even though my site says it was successfully sent.  If anyone could give any advice on what I could possibly being doing wrong that would be great.
    Thanks, Anthony.
    Here is my actionscript and PHP:
    function submit(e:MouseEvent):void
    var variables:URLVariables = new URLVariables();
    variables.fromname = nameText.text;
    variables.fromemail = emailText.text;
    variables.frommessage = messageText.text;
    var req:URLRequest = new URLRequest("contact.php");
    req.data = variables;
    req.method = URLRequestMethod.POST;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, sent);
    loader.addEventListener(IOErrorEvent.IO_ERROR, error);
    loader.load(req);
    statusText.text = "Sending...Please wait.";
    function sent(e:Event):void
    statusText.text = "Your email has been sent.";
    nameText.text = emailText.text = messageText.text = "";
    function error(e:IOErrorEvent):void
    statusText.text = "Error, please try again.";
    sendButton.addEventListener(MouseEvent.CLICK, submit);
    PHP:
    <?php
    $sendTo = "[email protected]( I am aware this needs to be different)";
    $subject = "Email from Web site";
    $name = $_POST['fromname'];
    $from = $_POST['fromemail'];
    $message = $_POST['frommessage'];
    $message = stripslashes($message);
    $content = "Name: " . $name . "\n";
    $content .= "Email: " . $from . "\n\n";
    $content .= $message;
    if (mail($sendto,$subject,$content))
    echo 'response=passed';
    else
    echo 'response=failed';
    ?>

    I had the correct case in my code, so that was not the problem.  It appears that the there is no communication with the server.  Do you have any other ideas as to why the send button would not actually being contacting the server?
    Thanks for the help

Maybe you are looking for