Tutorials All - Webdesign, Graphic Design

Visit our new Webdesign Templates,css,html5 etc

Download New Android Applications

Visit our new Collections of Android Application

30.3.11

How to Make a Play Button for an Animation in Adobe Flash Cs4


The first peice of as2 nscripting you will learn is the statement stop();. But once you have learned it what the hell is it used for. You can put buttons in a stopped frame once you learn the coding. Im going to show you how.


1 First draw what the button will be when the mouse is away from it.

2 Highlight it using the highlight tool and press F8
3 Name it something, select the middle box in the group of boxes and select button (not movieclip, not graphic, button)
4 Double click your newly made button in the stage. This will take you to a new page where there will be another set of empty frames and a bar at the top which also says scene 1 and the name of your button.
5 On the second frame (over), make a new keyframe and draw what it will look like when you roll over it.
6 Press Scene 1 on the top bar and move your button to where you want it to go.
7 Click the button and press F9. This takes you to the coding panel.
Your Ad Here

8 Now copy and paste this script. Where there is a <newline> means put a new line

on(release){<newline>nextFrame();<newline>}
on release tells the computer when to do the function which in our case is when you release it. nextFrame(); means go to the next frame. Instead of nextFrame you can put gotoAndStop(framehere) and the } at the end means close function.
You have made your first working button. Play around with the code and check google for any edits you can make.

0 comments:

Post a Comment