#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Helden,Limburg,The Netherlands
    Posts
    33
    Rep Power
    15
    How can I send variables from PHP to flash? Sending variables from flash to PHP is not such a problem but the other way around is not working yet!!!

    ------------------
    Ramon Litjens
    Boradoli Web Sesign
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Englewood, CO
    Posts
    30
    Rep Power
    15
    I never use Flash, but I assume that it is embedded in your HTML like any other applet/activex-type object? That is, you put it in your HTML with parameter values?

    If this is the case, you could use PHP to create the HTML of the page, inserting specific parameter values wherever needed. For instance, if your object takes a parameter speed that you want set to 5 for one case or 10 for another, try this:

    <OBJECT TYPE="Flash">
    <PARAM speed=
    <?
    if (some_condition) {
    print "5";
    } else {
    print "10";
    }
    ?>
    >
    </OBJECT>

    This would work for an applet or activex object for sure, but not sure about Flash.

    As far as having PHP act as some kind of server to specifically call your Flash object and send it data, that's beyond me...perhaps beyond Flash or PHP.

    -TM

  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Helden,Limburg,The Netherlands
    Posts
    33
    Rep Power
    15
    Thank you,

    The way to do it is to just have PHP sent a file back that is more like a txt-file than a HTML-file. It just contains name-value pairs.

    If somebody had the same problem and needs some more details you can contact me at my e-mail adres.

    Greetz,
    Ramon.

Similar Threads

  1. PHP to Flash
    By absolutemonkey in forum Flash Help
    Replies: 8
    Last Post: February 6th, 2004, 08:33 PM
  2. php code to use variables from the url
    By Nullified in forum PHP Development
    Replies: 2
    Last Post: January 30th, 2004, 02:19 PM
  3. load vars from flash to php then back to flash
    By markhegz in forum PHP Development
    Replies: 1
    Last Post: January 22nd, 2004, 07:13 PM
  4. passing variables from a txt file to flash
    By matto in forum Flash Help
    Replies: 1
    Last Post: January 20th, 2004, 11:25 AM
  5. PHP Newbie > using HTMLAREA to save texarea
    By wonderdog in forum PHP Development
    Replies: 1
    Last Post: January 16th, 2004, 05:28 AM

IMN logo majestic logo threadwatch logo seochat tools logo