Latest tutorial: Making a Movieclip face another Movieclip or point on the stage | Ask Tutorial5!
 

Get tutorials on EMail




Making a simple Adobe Flash 8 button – tutorial for beginners

(37 votes)
Written by AnaS   

In this tutorial it will be explained how to make a simple Adobe Flash 8 button.

Create a new Flash 8 document with 400x300 dimensions and Frame rate 12 fps.

Draw a rectangle using the Rectangle Tool. Select both Stroke and Fill for the rectangle and set the following in the Properties Inspector: width: 175, height: 60; Stroke Color: #000000; Fill Color: #0066ff.

While the rectangle is still selected choose Modify>>Convert to Symbol or press F8. In the Convert to Symbol window set Button for Type and put the name MyButton. Great! This is your first Flash 8 button.

For editing your Flash 8 button you simply double click it. In this moment you should see something like the picture below:

 

Flash 8 buttons - tutorial for beginners

 

 

 

 

Each Flash 8 button has four states, as it follows:

Up – is when the mouse is outside the button;

Over – the mouse roll over the button but it is not clicked;

Down – the button is clicked;

Hit – represents the area of the button where the mouse can hit.
The button works only when you click in the specified area. This area is invisible for the user, only the programmer can see it.

Let’s customize our Flash 8 button now!

Press three times F6 to introduce keyframes for all four states.

Go to the second frame Over, select the rectangle found there and change Fill Color to #00ff00 in the Properties Inspector. In the third frame Down change Fill Color of the rectangle to #ffcccc.

Test the movie CTRL+Enter and see the result. You observe that when you are over the Flash 8 button your mouse pointer is a hand. Also when you click the Flash 8 button its color is changed to pink.

Now go to the last frame Hit, select both Stroke and Fill for the rectangle and modify width to 75.

Test the movie (CTRL+Enter) again. Move the mouse over the Flash 8 button and observe that when you are over the left part of the button this act like before, but when you are over the right part of the button this doesn’t react ay kind.

You need to Register in order to download the FLA file.

 



Subscribe now via RSS feed and get all the new tutorials

written by eliazer , June 27, 2007

great we want more, i am a total beginer.
written by Candy Wrap , July 04, 2007

how do u make a button that takes u to a specified frame after u presss the button then plays the animation of the frame it goes to and stops at a certain spot with another button and u press that and it goes to another frame.
written by AnaS , July 08, 2007

You have to add some action to your button. First you have to give to your button an instance name (in the Properties Insspector). Let's say you have a button with the instance name myButton_btn. Make a new layer named actions and in the frame with the button put this code in:
myButton_btn.onRelease=function(){
this.gotoAndPlay(number_frame);
}

where the number_frame represents the number of the frame you want to play. And so on.
written by Mick , September 11, 2007

All this help works but I can't get it to work when I use it in HTML, The button deos not show up or even work.
written by wondering , January 11, 2008

When i press the button it doesent go to the place i said it shuld go to. How do i fix that?
written by jennifer , January 31, 2008

Im new at flash :( can anyone help me?... all i want to create is a "play" button in the beginning of my flash movie that stays on the screen until the user presses it. Then after its pressed the movie plays and then the button re-appears at the end but says "replay."
written by Angie McCutcheon , January 31, 2008

yes,

I have a button with the following code:

next_btn.onRelease = function(){
gotoAndPlay("Scene2",1);
};

but I get an error message everytime that states "statement must appear in handler".

I have the code in the end of my actionscript line above my button timeline.
written by jennifer , January 31, 2008

i dont understand what to do with that... i dont know anything about script or codes. what do i do with that?
written by George Georgiev , January 31, 2008

Hi!Can you tell me How to create a Loader (just a Rectangle),but When I click on the button,the ('object') Loader will load another SWF file?
written by hve1 , February 20, 2008

i want my button to take me to a waebsite, what shall i write in the actions window?
written by H , March 22, 2008



I know that you will right click on your button, choose actions, Choose the symbol, Global Functions(or Basic), the Browser/Network, and getUrl. Enter the Url in the parenthesis, and choose target then close the menu box.

I havent tested this yet as I cant find what to target after assigning the url.


written by JUNTI , March 29, 2008

how can i put the URL.? to make it action
written by AnaS , April 06, 2008

For adding an URL to your button see more on How to create a hyperlink in Flash using getURL() method. You can find this tutorial in Software Tutorials >> Flash Tutorials section.

Best wishes, AnaS

Do you need more help? Ask now!
 

busy
Last Updated ( Saturday, 22 March 2008 )