Hello,

I have an e-card site that I would like to improve.
Right now, the e-card consists in an animation on the left part of the page to which users add a message (stored in a database) on the right part of the page.

I would like know to integrate the message they add directly into the animation.
Is that possible ?? If yes, how to do so ?

Thank you !
Bruno

    This is a Flash question so I can't give you specific programming instructions but I can tell you in general what you should be looking for.

    There are two primary ways to get Flash to include external data. One is to use PHP to alter the parameters that you put in the embed statement. This is probably the direction you want to go. When you build the embed statement, use PHP to look in the database, find the text that should go with this animation, and put a parameter in the embed statement says something like:

    x="So long Bob, and thanks for all the fish!!"

    Then, in your Flash movie, you can look at the value for X and display it in the movie.

    Another way to do it would be to have a PHP page that displays a message. You can make your Flash movie go out to the Internet (or your home server, at least) and read that PHP file. You can pass in a userid or the PHP script can use a session ID to know which user is viewing the Flash movie and PHP can read and display the appropriate line from the database. Flash hears this message (because it was going to the PHP page as if it were a web site), and can store the message in a variable that it can use to display in the movie.

    So now you're half the way there. Now you just need to get some syntax details about Flash to find out how to obtain variables from the embed parameters or to read web pages on the home server and that I can't help you with.

      Write a Reply...