Now, you can develop some pretty cool applications with power like this...and one of the coolest (and easiest) is a dynamic news ticker, updated from a MySQL database. Let's see how.
First, pop open a new Flash movie and create a dynamic text box symbol, in the manner described on the previous page. Call it "ticker", and name the variable which will contain the data for the text box "content".
Format the appearance of the text box, by adjusting the values in the Window -> Panels -> Text Options and Window -> Panels -> Character dialog boxes. I used a white Arial font, size 12, right-aligned.
Next, we need to create a motion tween to move the text box horizontally across the bottom of the movie. Insert an instance of the newly-minted "ticker" symbol into your movie clip, outside the lower right edge of your movie clip.
Insert a new keyframe in your timeline somewhere around frame 40, and move the symbol instance all the way across to the other edge of the movie clip.
Right-click anywhere between the two keyframes in the timeline and insert a motion tween.
Test your movie. You should see the symbol instance float horizontally across the bottom of the screen.
This tells Flash to load variables generated by the server-side script "ticker.php" into the movie, and use them wherever required. Let's look at that script next.
How to do Everything with PHP & MySQL How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.