Email PHP in flash

Hello flash experts,
I purchased a started flash template for my site and all is
done except I cannot figure out how to use the email.php form
within the site. On one of the pages that was already created I
have a form with things to enter such as name, email, etc.. When I
purchased the package it came with a email.php file that I believe
is used to send the form anwsers to my email address. I opened the
php file in Opera (in my mac) and saw that there are a few names to
change. I changed these so the email would email to my address but
it is not working. I am not sure if there is something I am missing
or if I am supposed to do something else with the php files? Any
help would greatly be appreciated. here is the code with the
email.php
<?
$destination="[email protected]";
$name=$_POST['name1'];
$email=$_POST['email'];
$company=$_POST['company'];
$from = '[email protected]';
$phone=$_POST['number'];
$mes=$_POST['message1'];
$subject="Message from $name" ;
$header="From: $from\n";
$mes="Name: $name\n
Company: $company\n
Email: $email\n
Phone: $phone\n
Comments: $mes\n";
mail($destination,$subject,$mes,$header); ?>
and the form on my flash page asks for
NAME
EMAIL
ETc...
Thanks for the help!!!
Matt

thanks kglad
what is the
$from = '[email protected]';
do I write my email there as well?
I see the the loadvars class is used in the flash page.
Is there anything wrong with the php code I listed above???
I just upload the php file to the server correct?
Thanks again for your help
Matt

Similar Messages

  • Ebook of tutorial - PHP 5 & Flash cs4

    im looking for a descent book or tutorial wich will teach me how to put php in flash cs4
    i got a book here at school, but its for AS 2.0 ...
    no point in reading that one ..
    thx in advance
    grtzzzzzz

    Here are some basic tuts for the same :-
    http://www.flashconf.com/actionscript/how-to-mail-flash-form-with-actionscript/
    http://video-tutorial.eu/free-video-tutorial/web-design/flashvars-and-php-tutorial-send-dy namic-variable-into-flash.html

  • Contact Form with Email PHP not working?

    Hello !
    Here is a link to my contact form:
    http://bayareafacepainters.com/quote_face_painting.html
    Here is the tutorial I am following to set up the Form to Email PHP
    http://www.freecontactform.com/email_form.php
    My form is not working. It is not sending me the email, and the "Thank you for contacting us page" is not showing up either. Is this a simple fix? I am not an expert coder, any help on what I am doing wrong or missing would be helpfull!

    Thank you for the suggestions... I cleaned up the names, and so I guess I am supposed to match the names in the form  to the PHP, so I changed the PHP to reflect the names of the fields in the form... it seems there may be more areas where I need to do this... What else does this need to work properly?
    http://www.bayareafacepainters.com/quote_face_painting.html
    <?php
    if(isset($_POST['email'])) {
        // EDIT THE 2 LINES BELOW AS REQUIRED
        $email_to = "[email protected]";
        $email_subject = "Face Painting Quote";
        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['Name']) ||
            !isset($_POST['Email']) ||
            !isset($_POST['Phone']) ||
            !isset($_POST['Contact_Preference']) ||
            !isset($_POST['Contact_Preference']) ||
            !isset($_POST['Date']) ||
            !isset($_POST['Time']) ||
            !isset($_POST['Location']) ||
            !isset($_POST['Guests']) ||
            !isset($_POST['Age']) ||
            !isset($_POST['comments'])) {
            died('We are sorry, but there appears to be a problem with the form you submitted.');     
        $Name = $_POST['Name']; // required
        $Email = $_POST['Email']; // required
        $Phone = $_POST['Phone']; // 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);
    ?>
    <!-- include your own success html here -->
    Thank you for contacting us. We will be in touch with you very soon.
    <?php
    ?>

  • 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 :)

  • Send info. to email address in Flash

    Hi
    I'm creating a site that must contain a page where the user
    must enter their email address which is then forwarded to the site
    owner's email address.
    They must enter this to access a certain section of the site.
    I've only been able to find a tutorial that shows you how to
    send info. to an email address that the user inputs themselves.
    Any help would be much appreciated.
    Cheers

    Use the LoadVars and send method which sends variables to a
    server side
    script (CFM, PHP, ASP, CGI or Perl) which processes the email
    and then sends
    it to the correct location.
    Dan Mode
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    "Dilroy" <[email protected]> wrote in
    message
    news:ea5blr$99p$[email protected]..
    > Hi
    > I'm creating a site that must contain a page where the
    user must enter
    > their
    > email address which is then forwarded to the site
    owner's email address.
    > They must enter this to access a certain section of the
    site.
    > I've only been able to find a tutorial that shows you
    how to send info. to
    > an
    > email address that the user inputs themselves.
    > Any help would be much appreciated.
    >
    > Cheers
    >

  • PHP and Flash

    Hi,
    I need to display a Username in a Flash Banner in my website. The Site is PHP and the header is made in Flash. My requirement is that, when a user Logs in, his name should be displayed in the Top of the site (in the Flash banner here) like "Welcome User". Is it possible ? I have the PHP file which displays username. All I need is that to merge it to the flash banner (through actionscript, isnt it ?)
    Please help me
    Thanks
    Vipin
    [email protected]

    Please don't cross post in these forums.

  • Passing variables from PHP to Flash

    I have a contact form that works. The user enters their info,
    hits submit, and their info is emailed to me. I need to figure out
    how to have the PHP script send back a confirmation that the email
    was actually sent. I can't get the php to echo just a "yes" or
    "no". Here is what I have so far:
    Flash code to bring in PHP variable to notify user if mail
    has been sent or not:
    function receive_response(e:Event):void
    var loader:URLLoader = URLLoader(e.target);
    var email_status = new URLVariables(loader.data).success;
    if(email_status == "yes")
    status_txt.text = "Success! Your message was sent.";
    timer = new Timer(500);
    timer.addEventListener(TimerEvent.TIMER, on_timer);
    timer.start();
    else
    status_txt.text = "Send failed! Please email or call us";
    and here is my entire PHP Code. The code in bold at the bottom
    is where it is supposed to pass the "yes" or "no" as the variable
    success
    <<meta http-equiv="content-type"
    content="text/html;charset=utf-8">
    <?php
    // Create local PHP variables from the info the user gave in
    the Flash form
    $senderName = $_POST['userName'];
    $senderEmail = $_POST['userEmail'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName = stripslashes($senderName);
    $senderEmail = stripslashes($senderEmail);
    $senderMessage = stripslashes($senderMessage);
    $to = "info@*******.com";
    // change this to reflect your site
    $from = "contact@*********.com";
    $subject = "Contact from ***********.com";
    //Begin HTML Email Message
    $message = <<<EOF
    <html>
    <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Email</b> = <a
    href="mailto:$senderEmail">$senderEmail</a><br
    /><br />
    <b>Message</b> = $senderMessage<br />
    </body>
    </html>
    EOF;
    //end of message
    $headers = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    $to = "$to";
    if (mail($to, $subject, $message, $headers))
    echo “success=yes”;
    else
    echo “success=no”;
    exit();
    ?>
    Thanks

    I have a contact form that works. The user enters their info,
    hits submit, and their info is emailed to me. I need to figure out
    how to have the PHP script send back a confirmation that the email
    was actually sent. I can't get the php to echo just a "yes" or
    "no". Here is what I have so far:
    Flash code to bring in PHP variable to notify user if mail
    has been sent or not:
    function receive_response(e:Event):void
    var loader:URLLoader = URLLoader(e.target);
    var email_status = new URLVariables(loader.data).success;
    if(email_status == "yes")
    status_txt.text = "Success! Your message was sent.";
    timer = new Timer(500);
    timer.addEventListener(TimerEvent.TIMER, on_timer);
    timer.start();
    else
    status_txt.text = "Send failed! Please email or call us";
    and here is my entire PHP Code. The code in bold at the bottom
    is where it is supposed to pass the "yes" or "no" as the variable
    success
    <<meta http-equiv="content-type"
    content="text/html;charset=utf-8">
    <?php
    // Create local PHP variables from the info the user gave in
    the Flash form
    $senderName = $_POST['userName'];
    $senderEmail = $_POST['userEmail'];
    $senderMessage = $_POST['userMsg'];
    // Strip slashes on the Local variables
    $senderName = stripslashes($senderName);
    $senderEmail = stripslashes($senderEmail);
    $senderMessage = stripslashes($senderMessage);
    $to = "info@*******.com";
    // change this to reflect your site
    $from = "contact@*********.com";
    $subject = "Contact from ***********.com";
    //Begin HTML Email Message
    $message = <<<EOF
    <html>
    <body bgcolor="#FFFFFF">
    <b>Name</b> = $senderName<br /><br />
    <b>Email</b> = <a
    href="mailto:$senderEmail">$senderEmail</a><br
    /><br />
    <b>Message</b> = $senderMessage<br />
    </body>
    </html>
    EOF;
    //end of message
    $headers = "From: $from\r\n";
    $headers .= "Content-type: text/html\r\n";
    $to = "$to";
    if (mail($to, $subject, $message, $headers))
    echo “success=yes”;
    else
    echo “success=no”;
    exit();
    ?>
    Thanks

  • Php to flash (beginners level)

    <?php
    require_once 'db_config.php';
    $sql="SELECT * FROM guestbook";
    $result=mysql_query($sql) or die(mysql_error());
    $count=mysql_num_rows($result);
    while ($data = mysql_fetch_assoc($result)){
        $id = $data"[msg_id"];
        $sender = $data["msg_sender"];
        $subject = $data["msg_subject"];
        $text = $data["msg"];
        $date = $data["msg_date"];
        echo($count);
        echo($id);
        echo($sender);
        echo($subject);
        echo($text);
    echo($date);}
    ?>
    wich gives me this result in a browser 
    Actionscript Code:
    21Arnetest 1.2 3hallo, dit is een eerste test berichtje  blablablabalba  grtzzzzzzzzz2010-04-14 14:03:0022Arne Janssenshallo!test nog een keer2010-04-14 14:03:00
    now is my question; 
    how can i write this code better, so that flash can handle it? 
    do i make an array of the results? ive been reading tutorials on this, but i cant figur it out ...
    thx in advance for any help
    grtzzz

    this is how my codes looks now in flash
    the first piece of code is for submitting the form
    // php file
    var phpFile:String = "http://localhost/portfolio/insertmessage.php";
    // contact form
    var form:MovieClip = guestbookform;
    function sendMessage(e:MouseEvent):void
        // first check the fields
        var nameStr:String         = form.nameTxt.text;
        var subjectStr:String    = form.subjectTxt.text;
        var messageStr:String    = form.msgTxt.text;
        var allFields:Boolean = true;
        // check name
        if(nameStr.length < 2)
            allFields = false;
        // check subject
        if(subjectStr.length < 2)
            allFields = false;
        // check message
        if(messageStr.length < 2)
            allFields = false;
        if(!allFields)
            trace("All required fields not filled in!");
            form.statusTxt.htmlText = "<font color=\"#FF0000\">All required fields not filled in!</font>";
            //Alert.show("All required not filled in!");
            return;
        var variables:URLVariables = new URLVariables();
        variables.name = nameStr;
        variables.subject = subjectStr;
        variables.msg = messageStr;
        var urlRequest:URLRequest = new URLRequest(phpFile);
        urlRequest.method = URLRequestMethod.POST;
        urlRequest.data = variables;
        var loader:URLLoader = new URLLoader();
        loader.addEventListener(Event.COMPLETE, sendHandler);
        loader.load(urlRequest);
    function sendHandler(e:Event):void
        var loader:URLLoader = URLLoader(e.target);
        var variables:URLVariables = new URLVariables(loader.data);
        trace(variables.test);
        if(variables.resultCode == "SENT")
            // message sent
            form.statusTxt.htmlText = "<font color=\"#009933\">Email sent, thank you.</font>";
        else if(variables.resultCode == "ERROR")
            // message not sent
            form.statusTxt.htmlText = "<font color=\"#FF0000\">Email not sent, please try again.</font>";
        else
            // unknown response
            form.statusTxt.htmlText = "<font color=\"#FF0000\">Unknown ERROR</font>";
    form.sendBtn.addEventListener(MouseEvent.CLICK, sendMessage);
    var data:Array;
    function completeHandler(event:Event):void {
        var loader:URLLoader = URLLoader(event.target);
        dataA = loader.data.split(",,,");
        dataA.pop();
        for(var i:uint=0;i<dataA.length;i++){
            dataA[i] = dataA[i].split(",,");
            dataA[i].shift();
    dataHolder.text = data[1];

  • Email image from flash

    I created an email form in my swf. It emails text from input
    fields. I want to also include an image with the text. Does anyone
    know how to do that?

    So first you must use BitmapData to export the data from
    flash to some picture file with for example php is good.You can use
    BitmapData.draw(Target) and after that to store all the pixels into
    array and send to php there must generate new image file.I
    recommend to use POST method because the array of pixels is too
    long and when you dont have access to the php.ini file to change
    the max send data for get the server send errors.Okey now i stop to
    talk and i give you link to .fla file because is too long to
    explain.This file is my project that you can get picture from the
    camera and save into the server is simply application and i think
    you can understand the chifly idea.So when you create your
    application u must add some lines into php that send the picture
    and message to email. Link to fla. -
    http://www.nikis.org/BitmapData.Draw.zip
    The other way that i already say you is to upload file with
    FileReference
    LiveDocs
    FileReference.And afcource the php see in this site into
    comments very useful things about attachment and send via html
    PHP Mail() Function
    btw i forgot i have small problem with the colors sometimes
    the new saveed picture has more green color.But i think this can
    script can explain the idea :)
    cheers!

  • Communication PHP with Flash

    Hi,
    Is it possible :
    - from PHP page to pass parameters to Flash (SWF) file ?
    - from Flash (SWF) file to retrieve parameter to PHP page ?
    i'm asking that because i would like to do the following
    things :
    - in my PHP page, user will select interface language and
    automatically
    the flash should turn all text strings (located inside the
    flash) into
    selected language.
    - Flash animation should be able to retrieve variable value
    from
    PHP/HTML in order to use them like : read/save from/to
    database postgresql.
    thanks a lot,
    A.

    Hi Alain,
    It most certainly is. This ability has been around for quite
    a while and
    Flash/PHP work well together. I happen to specialize in
    Flash/PHP/MySQL
    integration (though I'm faimiliar with PostGRE as well). It's
    not complex or
    difficult but a bit lengthy for the forum. Drop me a line and
    I can give
    you more concrete exampled: patrick (AT) baynewmedia (DOT)
    com
    Regards,
    Patrick Bay
    BAY NEW MEDIA
    "Alain R." <[email protected]> wrote in message
    news:fmvvbr$ok2$[email protected]..
    > Hi,
    >
    > Is it possible :
    > - from PHP page to pass parameters to Flash (SWF) file ?
    > - from Flash (SWF) file to retrieve parameter to PHP
    page ?
    >
    > i'm asking that because i would like to do the following
    things :
    > - in my PHP page, user will select interface language
    and automatically
    > the flash should turn all text strings (located inside
    the flash) into
    > selected language.
    > - Flash animation should be able to retrieve variable
    value from PHP/HTML
    > in order to use them like : read/save from/to database
    postgresql.
    >
    > thanks a lot,
    >
    > A.

  • Communication problem MYSQL PHP XML Flash.

    I have driven myself into a corner with this so I hope someone here knows a solution.
    I am building a photogallery with a simple html layout but with a flash slideshow.
    The data for each album and photo are stored in a mysql database. Each photo-image is in one big folder on the server. With PHP I sort out which photo belongs to what album and display them accordingly. To start the slideshow people can click on a link near the album, this link will send a < href> with the album ID to an PHP file (xml.php) that will generated an XML output created from the MYSQL server. Here comes my problem:
    Loading XML into flash is no problem BUT I only know how to do this with a static or self supporting XML output. (xml.php needs the input of the album ID else it will not get the correct data). For now I have a temporary solution where I write the XML output from xml.php to a txt file and let Flash read from there, but is there a way where I can read directly from xml.php?

    Echo your formatted xml out as a string in xml.php, Flash will then read your dynamically generated XML.

  • Email link in Flash CS5 and how to bold typeface...

    Hi, total flash newbie here with a few questions:
    1.) I'm trying to put an email hyperlink in part of my text, but I can't seem to figure out how to do it. I tried the code snippets, click to go to web page but instead of an URL I typed "mailto:[email protected]" but when I tested it, nothing happened.
    2.) How do I link to the other pages from within the website that I'm working on? Again, I'm a total newbie and I'm only familar with Dreamweaver.
    3.) Lastly, how do I bold the typeface??? The text tool properties do not show any bold, italic, or underline icons, and the hotkey to bold is the break apart command.
    4.) When I test my movie, how come I can't scroll down and see the footer area of the SWF??
    If there's someone on these forums that could help me with these problems, it would be greatly appreciated.
    Thanks!

    TO create a hypper link for a text u can assign text as html text to the text field
    tf.htmlText="<a href=\"http://www.adobe.com\">adobe</a>";
    this code assigns the opens up adobe.com on clicking on text 'adobe' which in assigned to tf
    TO create a bold interface click on the test fiels in the properties panel u will see 'B" button clickinng on which the txt is bold
    IN AS u can set bold as below
    import flash.text.TextFormat;
    import flash.text.TextField;
    var tf = new TextField();
    var tff:TextFormat = new TextFormat();
    tff.size=30;
    tff.bold = true;
    tf.defaultTextFormat=tff;
    tf.htmlText="<a href=\"http://www.adobe.com\">ADOBE</a>";
    addChild(tf);
    for mail:
    <a href=\"mailto:[email protected]?subject=Feedback\">click here </a>
    if set as button
    on (release) {
             getURL("mailto:[email protected]?subject=Feedback");

  • Sending variable value from php to flash to load an xml file

    I would like to load an XML file from the location locally or on the server being unaware of the name of the file. I am using PHP for sending the filename to Flash.
    The below is the PHP code:
    <?php
    filesInDir('C:\Documents and Settings\457305\My Documents\shrikant\Flash Tutorials\webassist');
    function filesInDir($tdir)
            $dirs = scandir($tdir);
            foreach($dirs as $file)
                    if (($file == '.')||($file == '..'))
                    elseif (is_dir($tdir.'/'.$file))
                            filesInDir($tdir.'/'.$file);
                    else
                            echo "fileName=$file";
    ?>
    And below is the loading Actionscript code:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.net.URLVariables;
    stop();
    // Define the PHP file to be loaded
    var phpFile:String = "http://localhost/webassist/test.php";
    var cons_xml:XML;
    var xmlLoader:URLLoader = new URLLoader();
    // Specify dataFormat property of the URLLoader to be "VARIABLES"
    // This ensures variables loaded into Flash with same variable names
    xmlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    xmlLoader.load(new URLRequest(phpFile));
    xmlLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(evt:Event):void
              trace(evt.target.data.fileName);
              //cons_xml = new XML(evt.target.data.fileName);
              //gotoAndPlay(2);
    When I trace the evt.target.data it displays "fileName=mainOpenEndedXML%2Exml" and when I trace evt.target.data.fileName the fileName is properly displayed as "mainOpenEndedXML.xml".
    But in the next two lines where the loading occurs it does not load the file i.e the swf file from xml doesn't play.
    I have been searching the Internet for answers but not able to find any solutions.
    The loading works properly if i directly insert the xml file in the code and the swf's in the XML file play propertly. The below is the code for the same:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.net.URLVariables;
    stop();
    var cons_xml:XML;
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest("mainOpenEndedXML.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(evt:Event):void
              cons_xml = new XML(evt.target.data);
              gotoAndPlay(2);
    Any help on this would be greatly appreciated

    Yes. you already said that, but I guess you don't understand what I said.  You are loading the PHP fle to get the filename, but nowhere are you taking that filename and loading the file that was named. 
    You need to do two loading operations.  The first one to get the filename, and the second to load the file with that name.  Maybe if you name the PHP file loader phpLoader instead of xmlLoader it will start to make more sense to you.  Something like the following...
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import flash.net.URLVariables;
    stop();
    // Define the PHP file to be loaded
    var phpFile:String = "http://localhost/webassist/test.php";
    var phpLoader:URLLoader = new URLLoader();
    // Specify dataFormat property of the URLLoader to be "VARIABLES"
    // This ensures variables loaded into Flash with same variable names
    phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    phpLoader.load(new URLRequest(phpFile));
    phpLoader.addEventListener(Event.COMPLETE, processPHP);
    function processPHP(evt:Event):void
             var xmlLoader:URLLoader = new URLLoader();
             xmlLoader.load(new URLRequest(String(evt.target.data.fileName)));
             xmlLoader.addEventListener(Event.COMPLETE, processXML);
    var cons_xml:XML;
    function processXML(evt:Event):void
              cons_xml = new XML(evt.target.data);
              gotoAndPlay(2);

  • Need help with php and flash

    Hi,
    hopefully anyone can help me out here I am working on a site
    that has part flash and html in it. I am using php to dynamically
    pull in the flash files from an includes folder. In doing so I have
    uploaded everything to our preview server where I tested the site.
    It works in firefox but not in the ie browsers, I thought this had
    to do with active control, so I downloaded the extension but
    nothing happened, still it works in firefox and not ie either 6 or
    7. t
    click
    here to view the site I am working on. If you have suggestions
    please let me know. I have attached the code as well for one of the
    flash animations.
    Thanks

    Looking at the source of your page, I note that you missed a
    couple lines in the AC_FL_RunActiveContent embed. These 2 lines go
    in the head of the page.
    <script language="javascript"> AC_FL_RunContent = 0;
    </script>
    <script src="AC_RunActiveContent.js"
    language="javascript"></script>

  • XML, PHP and Flash forms

    After searching several tutorials and forum posts, I still am
    puzzled at how to get started on this.
    I want to enable my client to upload changes to the XML file
    used on his site without knowing anything about XML. He also wants
    to upload images which are referenced in the XML. So, I am assuming
    that I create a form that allows him to type in changes to sections
    and select an image on his local drive and submit it to a PHP
    script on the server which will, in turn generate/update the XML
    and upload the image(s).
    Is this correct or am I going about it the wrong way? Of
    course, I should just tell him he'll have to pay me to update the
    site. ;-) I'm really confused about how to start this whole thing
    in the planning stage. I just need a little direction then I can
    research the rest.
    thanks!

    aniebel wrote:
    > So, do I make fields (variables) for each node in the
    XML? And can I use any
    > PHP script that converts my loadvars to XML? I'm not
    sure what to search for,
    > specifically. I hope I'm not in over my head but it
    seems getting into these
    > predicaments is a great way to learn.
    >
    are you making this admin interface in flash then? personally
    I would
    steer clear of that as it will be harder to debug - doing it
    in HTML
    will be much more straightforward, and if you do it right you
    can change
    to using a flash front end in future.
    Handling file uploads in PHP is a little tricky but there are
    loads of
    good pages of advice on using PHP on the web. Here's a good
    place to
    start as there's lots of notes by other users:
    http://us2.php.net/manual/en/function.is-uploaded-file.php
    XML with PHP I have only done once - and I think that was
    just reading
    it and not writing it. Should be OK though, again, lots of
    help
    available online!
    MOLOKO
    Macromedia Certified Flash MX 2004 Developer
    Macromedia Certified Flash MX Developer
    ::remove _underwear_ to reply::
    'There ain't no devil - it's just God when he's drunk' Tom
    Waits
    GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+
    w+++$ !O M+
    VMS? PS+++ PE- Y PGP+ t+ 5-- X-- R* tv++ b++++ DI++++ D+ G e
    h-- r+ y++

Maybe you are looking for

  • Deploy UDI Windows 10 with SCCM 2012 R2 and MDT 2013 Update 1

    Hi, Trying use "User-Driven Installation"  with SCCM 2012 R2 CU4 and MDT 2013 Update 1 for deploy Windows 10. Created MDT Task Sequences with template "Client Task sequence" and Deployment Method "User-Driven Installation". When I try to deploy I hav

  • I get this message "request timed out" everytime i tried to play a video .

    I've been having this problem for serval months now and it's annoying at first i used to watch videos and movies normal , but now everytime i try to visit a website to watch a movie when i click play i get this message " request timed out " after two

  • How much leeway for blowing up when downconverting HDV to SD?

    Hi. I'm trying to understand how much I can blow up a HD/HDV image when the final format for a project is an SD DVD. How much and why... I'm working on a DVD of a play. The producer thinks our wide shot is too wide. She wants me to blow it up wheneve

  • Quote does not print correct price

    I created a price quote in VA21 for material XXXXXXX, entered the price in the sales tab & I've a price scale(VK12) for the same material under YPR0, when I print the quote the price I get is from the price scale(VK12). I'd like to print the price fr

  • MF60 : round up replenishment proposals

    Dear guru , It's possible to define a rounding value or a rounding profile for every material in order to round up the replenishment proposals in MG60 ? Thanks in advance.