I play a lot of games that makes a mistake in the UI, and it’s so freaking simple to correct. What mistake am I talking about? Well I just made a little sample of it, picture this is a shooting game (and I guess you need to use a lot of your imagination there), and we have a button for changing the sound. Try clicking on the “empty” space of the swf, and on the sound button.
What do you see? Oh yes, when we try and turn off the sound, we also shoot! That’s not good, I didn’t want to waste my precious ammo, I just wanted to turn the sound off.
And here is how to fix it:
In the event handler for the sound button, just add this line of code:
MC September 1st, 2010 at 13:36