A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: AS and XML and DBs

  1. #1
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213

    AS and XML and DBs

    Hello flashkit,
    I am thinking through a project. I know XML and flash interact - never used it before though. I have a few questions if I can find some help here before researching.

    Can XML be used dynamically to load specific movie_clips onto the stage?

    Let me give a scenario. I am thinking of a front end (PHP) which is used to populate fields in a DB. Next I want to load specific movie_clips into a flash player from a pool of clips; and depending on the DB content I populate it with, clips are chosen to load.

    Make sense?

    Say we got 20 items on a restaurant menu. Each item is represented by a movie_clip in a directory. I open a web page and enter info into a DB "I want a turkey sand." I click to open the flash movie and a picture of a turkey sand is loaded in the movie_clip that was called from the DB.

    IS SOMETHING LIKE THIS POSSIBLE? I CAN'T LOOSE ANYMORE SLEEP OVER THIS! HELP ME - PLEASE SOMEBODY - SOMEBODY - HELP ME!

    ODC
    Much to learn.... Much to learn....

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    storing the swf files in the database is possible but garbish- you should store them in folders and actually store the URLS to those in the databse or xml file. That beeing said you can store any string data in the xml including the strings and read it in a way in flash so that it starts loading the strings that are within the xml file

    sample xml file
    PHP Code:
    <xml title="cooking menu">
        <
    swf url="../swf/eggs.swf"/>
        <
    swf url="../swf/tomato.swf"/>
        <
    swf url="../swf/fish.swf"/>
        <
    swf url="../swf/ketchup.swf"/>
        <
    swf url="../swf/cheese.swf"/>
        <
    swf url="../swf/fly.swf"/>
    </
    xml
    once this xml would be loaded you would then use a movieClip loader to load in a sequence all needed parts (or 1 at a time depending how you want it). The xml could be generated from a php script

  3. #3
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213

    This is the idea

    I appreciate the response.

    So - This IS what I would like to accomplish. You have told me simply that it IS possible. DO you know of tutorials, and learning material I can access to learn how to do this? I have no idea where to begin.

    I can DB, I can write PHP, and I know flash well enough to put code where it needs to go (time line or on an object).

    I think I can figure this out with the right learning material.

    ODC
    Much to learn.... Much to learn....

  4. #4
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,059
    google "actionscript xml tutorial" to learn about XML interaction with flash
    then google "MovieClipLoader actionscript"

    should give you enough to get the job doen

  5. #5
    Odisey Odisey's Avatar
    Join Date
    Apr 2004
    Location
    WV
    Posts
    213

    XMLdbFLAS

    Enough to get started.

    Thank you for the reply..... It will comeTogether() once I get a grip on the concepts and coding.

    OTHER input welcome!

    THX
    ODC
    Much to learn.... Much to learn....

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