A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: php vars

  1. #1
    Join Date
    Oct 2001
    Nyon, Switzerland

    php vars

    Hi there everyone,

    I'd like to know if it's possible to get an array contained on a php variable and use it around on the stage of a flash movie.

    If it's possible, could you, please, give me an example?

    My php file pulls data from a mysql database, and isert it to an array and then into a var.

    then I'd like flash to get that var and read all the array and build a dynamic scroll list.

    If you have an example to give, it would be great.



  2. #2
    Registered User
    Join Date
    Feb 2001

    there is basically three ways to copy structured data (like arrays) to and from a movie
    a) individial vars:
    b) combined strings
    c) xml
    In either case, you need to wait for the vars in the movie and then run some actionscript to pack the data back into an array, if you want one
    The extra effort for xml pays (only) if your data is getting more complex than a plain array or a plain object - if you have arrays of objects with different members or objects composed of objects, xml allows to structure the data in a way similar to the object layout


  3. #3
    Join Date
    Oct 2001
    Nyon, Switzerland
    yep, looks like the first one would be the best one regarding what I want to do...

    Each name on these vars will be assigned to an url stored in database.

    This url is a link to a external swf movie, so when user select one of the options, flash will load the movie into the stage wich url is stored in DB.

    so, every name action will look like:

    on (release) {
    loadMovieNum (name[url], 1);

    well maybe I'm wrong, and if it's so, please let me know...

    I'm not a flash expert, so...

    thanks again


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center