XML Guestbook
with PHP
         by Arjen Gosman aka Flashmatazz: 18 april 2004

So you want to create a guestbook but you don't have a database like MySQL at your disposal? Then this tutorial might come in handy. The things you'll need are Flash, a PHP script and the XML file that will hold your data.

Here's how the guestbook will look like:

[ the XML guestbook in action ]

Setting up the Flash movie
Let's start by creating a new Flash movie. Or, alternatively, you could just read through the tutorial and download the ZIP file at the end ;)
Below I've described how the movie is setup exactly:

  1. On the main stage create e dynamic textfield with instancename myGuestbook which will hold all our text. In this textfield's properties, make sure it's a multiline textfield and that the Render text as HTML option is active.
  2. Drag the scrollbar component onto this textfield, or create your own custom scroller.
  3. Create a dynamic textfield with instancename myCount which is used to show the total amount of messages in our guestbook.
  4. Create an "Add a message" button with instancename createButton.
  5. Still on the main stage, create 2 buttons with instancenames previous and next which are used to walk through all pages of our guestbook.
  6. Create a dynamic textfield with instancename nowShowing.
  7. Create 2 buttons with instancenames previous and next.
  8. Create a movieclip with instancename createMessage.
  9. Inside this movieclip, create two input textfields: nameField and messageField.
  10. Also within this mc, create two buttons: closeButton and sendButton.
  11. Finally, still within this mc create a dynamic textField called errorField.
Now that we have all the elements we need, we can go and spice it up a bit with some actionscript. Let's continue to the next page.

   

 




SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple.