Interactive Background - Page 5

The Next Background Button

Open up the actions panel up for the button that you want to change the background to the next one. It is sensible to put this one on the right hand side, but it does not matter. Type in the following script.

You might now be able to see how this script works without me explaining it now because it is very similar to the previous background actionscript. I won't explain it all this time, just a few key points that have changed.

The a += 1 does the opposite of a -= 1. It adds one onto a instead of taking one away. It is the same as a = a + 1.

This time, the IF checks to see whether a is 5, there is no background for 5 so you have to reset a back to 1.

The rest of the actionscript does exactly the same, so if you don't fully understand it, you should look back over it.

Thats it! You should now have a Flash movie that changes the background whenever the user clicks a button to change it. Click on Control >> Test Movie (CTRL and ENTER / CMD and RETURN) to try it out.

My finished movie is shown below I also added an extra text box to tell you what the value of the variable a is so that you can see what is happening inside the movie.

» Description:
I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all

» Description:
Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.