SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    interface to php questions

    I'm building an administration back-end site (php/mysql) for a flash based website. The flash movie needs to be able to get info from php. Just to get it out there, I'm not a Flash programmer but have messed with it a little. So, bare with me.

    I will be storing the images in a MySql DB along with text. The browser can't re-fresh so everything needs to happen within Flash.

    My thoughts are that I'll be able to have a php file for each type of data that I need to display/load. So, if I wanted to load a movie clip with data for story #1, I could have a file called get_story.php?id=1, that page would get the text determined by the URL variable "id", and spit it out in a flash formatted variable. If I needed to load an image, I'd have get_image.php?id=1 and so on. A movie clip would load this data. Does that sound feesable?

    After finding out if that's going to work, and how... my next question would be... is it possible to have these items load on an as-needed basis? Or does everything need to be loaded first? I'm asking because of the browser re-fresh restriction I'm dealing with.

    Thanks for any tips/help in advance!

    Matt

  2. #2
    SitePoint Wizard bronze trophy JRMillion's Avatar
    Join Date
    Apr 2004
    Location
    Arlington VA
    Posts
    2,094
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Look for tutorials about the loadVars object. You use that to get info from PHP.You may also want to look into dynamicly creating an XML file and reading that into flash.

  3. #3
    SitePoint Member bradm's Avatar
    Join Date
    Jan 2004
    Location
    Ontario CA
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    we were able to take dynamic data into flash pretty easily for these two flash apps.

    http://www.oahu.com/maps/ (Uses asp)

    http://www.newfoundland.com/flash/f6detect.html?mapMe=0 (Using PHP)

    I didn't matter which language I used, all I did was save the information to a Text file. THen Flash (I didn't write the flash scripts) was able to read this information.

    We took information on Hotels, and their map coordinates on various levels (Zoom Levels). All this was read with either php/mysql or asp/MSSql .

    the text file looked something like this:

    hotelid=45,name=hotel name,address=454 overthere rd,telephone=800-999-4949

    that kind of thing. And the Flash Developer just read the information from the Text file.

    I hope that helps.


Bookmarks

Posting Permissions

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