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:
- 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.
- Drag the scrollbar component onto this textfield, or
create your own custom scroller.
- Create a dynamic textfield with instancename
myCount which is used to show the total amount of
messages in our guestbook.
- Create an "Add a message" button with instancename
createButton.
- Still on the main stage, create 2 buttons with
instancenames previous and next which
are used to walk through all pages of our guestbook.
- Create a dynamic textfield with instancename
nowShowing.
- Create 2 buttons with instancenames previous
and next.
- Create a movieclip with instancename createMessage.
- Inside this movieclip, create two input textfields:
nameField and messageField.
- Also within this mc, create two buttons:
closeButton and sendButton.
- 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.
|
|
|
|