Here is the finished SWF animation:
It looks quite nice, simple and easy to use, doesn't it? The reason it's so nice and easy to use is that we're going to work quite hard to make it be that way...
You might be surprised how many layers are used in this simple-looking project - this is not intended to make the project more difficult but rather to make the project easier - the point is that you can lock layers that you are not working on so that they don't get modified accidentally. In a similar way, this project makes use of movie clip symbols. The Flash animation itself is a movie so the use of movie clip symbols inside our animation implies that we have 'movies within our movie'. This allows us to keep the main timeline as simple as possible and to use a modular approach, opening up the movie clip symbols for editing only when necessary and otherwise leaving them closed so that our work area is not cluttered.
What you will learn in this tutorial
In this tutorial, I will show you:
| How to create, read data from and manipulate a String object, | |
| How to compare two different String objects, | |
| How to create a function that will pick a random word that has to be guessed, | |
| How to dynamically pull out a movie clip from the Library several times and display a different letter in each movie clip instance (this will create the letter buttons) and much more along the way. |
In the first optional extension to this project I will show you:
| What is an XML file, | |
| How to create an XML file where all the game data (words) will be stored (it's great to have the data in a separate file since this means we can modify the data without having to modify the FLA file or even use Flash at all), | |
| How to create and use an XML object in ActionScript to retrieve data from the XML file, | |
| How to parse (process) the XML data and place it into an Array object, |
In the second optional extension to this project I will show you:
| How to create a simple text file from which a single value will be loaded, | |
| How to create and use a LoadVars object to load the data from the text file. |
So, roll up your sleeves and follow my guidance. Let’s go!
Click HERE or the link below to jump to the first part of this 5 page tutorial (the last two pages are optional).
