Page 3 of 3
I am a Web Developer/programmer having acrued some 20 years experience in computing. I am skilled in Script, CSS, DHTML and more recently I have become a bit of a Flash fan. I am currently working with MX and I have received awards in other flash communities for tutorials which I have written. Nowadays I teach more about using PC's and troubleshooting as opposed to specialised topics like Flash.View all articles by Adrian Wherry
Add a further 3 key frames to frames 5, 10 and 15. This will allow us to add the up and down animation. In key frame 1, double-click the frame to open up the ActionScript Editor and select + > Basic > Stop. This will stop the movie from playing straight away.
In key frame 10 you will need to select the 'buttons' layer and move them all down to a position so that they can be seen below the cover. (See Figure 8.)
Also in this key frame, you will need to add another STOP command in the same way you did in frame 1 so that it does not return to it's normal position and again in frame 15.
Finally, as far as the animation is concerned, click on frame 15 and place the buttons back in their original starting position. Add a motion tween in between frames 5 - 10 and 10 - 15. (See Figure 9.)
Now if you run the movie within Flash it will show the buttons moving up and down.
Important Note: Make sure that all your buttons are grouped together using the GROUP command otherwise the buttons will not move together as one uniform block. To group your buttons together, select all the buttons (and text labels) and then press Ctrl+G keys.
That is the animation side of the menu complete.
Part 4. ActionScript
Now I will quickly go over assigning behaviours to the buttons. Obviously you will want the buttons to perform some sort of function when clicked. Here's how...
Important Note: REMEMBER TO RE-GROUP ALL THE BUTTONS AFTER ADDING YOUR ACTIONSCRIPT OTHERWISE YOU WILL GET ALL SORTS OF CONTORTED ANIMATION.
Select the 'down button' (the button you created which when clicked reveals the other buttons) by right-clicking on it to reveal a pop-up menu. Select Actions from the menu to open the Action Script editor. Click the + button then Go to. This will insert a partial script leaving you to fill in the frame number, in our case it will be number 5 as this is the start of the downward animation. (See Figure 10.)
To insert the script to return the buttons to the start position you will need to select frame 10 and then repeat the above sequence except you insert number 11 instead of 5. (See figure 11.)
Select frame 15 and repeat Step 1.
You can now choose what actions you wish the other buttons to perform. Normal practice is for another page to be loaded using the Get URL command.
You can also add sound to the buttons to enhance the finished article.