#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    1
    Rep Power
    0

    variables in flash


    Is there anyway to make flash use variables from a mysql database?

    Thanks,

    Warren
  2. #2
  3. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Apr 2000
    Posts
    1,058
    Rep Power
    22
    Sure.

    Have PHP (or your scripting language of choice) fetch the values and then pass them to your .swf something like this:

    Code:
    <param name="movie" value="your.swf?name=value">

    http://www.phpforflash.com/ is a decent site for more info about this sort of thing.


    wdn2k
  4. #3
  5. busy...is there any other way?
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Amersfoort, Netherlands
    Posts
    259
    Rep Power
    13
    that is 1 way of doing it....another (more dynamic in my opinion) is to let flash load a script with variables in it.

    howto outlined:

    on timeline let flash load variables (see loadmovie) and call a php (if u use php) script.

    the php script gets the wanted variables from a database (mysql in your case) en echo them as:

    echo "&var1=value&var2=value2&var3=value3";

    If flash load this it can use the variables var1, var2 and var3.

    For instance if you dynamically want to fill a textbox with the content of var1 you make a textbox in flash (after loading the script on the timeline) and use |AB in flash the make it a input type textbox and give the textbox the name var1.

    Now your flashmovie will show the content of var1 in the textbox.

    goodluck

IMN logo majestic logo threadwatch logo seochat tools logo