"Experience is the name everyone gives to their mistakes". Oscar Wilde (1854 - 1900)
We all make mistakes and this is good because it is how we learn. I thought it would be a good idea to try to set up a little list of common mistakes that I regularly see in Flash development.
The infamous Roll Over effect
Many times I have landed on a nice Flash intro or website to suddenly realize that they were plagued with the "infamous roll over effect", this obviously kills the magic and is no good even for the navigation. So what is the "infamous roll over effect" ? Roll over each bit of text in the 2 movies below and try to spot it by yourself.
movie1
movie2
As you might have noticed, in Movie 1 the hotspot is defined by the letters of the word in the text field which is very messy since nothing might happen when the user clicks on the button. In the second movie you can see that the hotspot is perfect and that the active area is clearly defined. So what's making a difference here ?
In Movie 2 we have defined a hotspot by drawing an invisible rectangle on a layer under the text (pic1) here it looks blue for demonstration purposes but the alpha for the fill color of the rectangle must be set to 0% (pic2)
pic1 pic2
This technique applies to buttons and button-movie clips see the 2 pictures below :
for buttons
for buttons-movie clip
You might be well aware of that "infamous roll over" issue but trust me there is still plenty of Flash files all over the place where you will be able to see it in action.
Incorrect naming of Instances
Very often I receive though my Flashvalley assistance requests to find out why a bit of code is not working and very often I can see that it is caused by instances which are incorrectly named. The usual mistake is to start the name of an instance with a number, this will create a silent error and it will seem that the code is not working but the real problem will be caused by an incorrect instance name. If you are unsure of the naming conventions in actionscript I strongly advise you to read naming conventions in actionscript.
Embedding fonts for dynamic text fields
If you are using a particular non-standard font that won't probably be installed on the user machine to display data in dynamic text fields, it is important to embed the characters that will be used to display the data. In Flash MX 2004 just press on the little button Character on the right hand side of the Var field (pic3). In Flash 8 press on the Embed button on the right hand side of the rendering method drop down menu (pic4).