How to make a button in Flash CS5?

Hi, this article I wanted to show you how to make a simple button in Flash CS5 -ActionScript 3.0! So we begin by creating a new document in AS 3.0.







If you open the program the welcome screen appears, where you can select the document you are interested. In this window, select the option to CREATE NEW - ActionScript 3.0
As you can see we came to a new document with the default settings of the stage. Nowgo to the top menu from which to select INSERT - NEW SYMBOL or choose from the keyboard CTRL + F8.
So there we have another window in which you must select the appropriate option for us.Of course, you type in the name of the "btn1" BUTTON on the type you choose.
If you click OK you will see that our Stage little will change and the time line. We goahead and choose the Rectangle tool (R), which is on the left side of your screen.Choose the color that is in the bottom of the panel of tools. The first rectangle from the top of the border, and another to complete our rectangle or other shapes. For thissecond square select a color or gradient.
If you do not want the default color of the gradient, you can change the Color window, which you can enable by using WINDOW - COLOR or ALT + SHIFT + F9. In this window,set the discretion of the colors and go to the rest of the article:)
If you have decided on the color of your button is now the future we can take another step and create our button. You already have everything selected and marked so it is enough that on the stage you do get a square or rectangle.
As you can see the weird bar got up on our table. Now if you want to resize or rotate the gradient we will need a tool called the Gradient Transform tool or choose from thekeyboard (F)
To transform our gradient is sufficient that you move into our future, and simply click onthe left mouse button click. You see, that there appeared a white circle and a squarewith an arrow in the middle. To rotate the gradient, just that you move the mouse cursoron a white circle and you'll see the cursor, which says that you can rotate the gradient. If you have set the gradient is a square with an arrow in the middle you can increase or decrease the gradient. Match all discretion and we will be the next step.
If you have a similar effect in his work as the picture above, we are well on your way. Be fitting to have our button a name. To do this, choose the Text tool (T) and write what youwant on the button.
As you can see, the button is almost finished, still need to create some kind offunctionality. To this end, we go a little higher, and more specifically to our timeline. Asalready noted Gotten it differs from the timeline, which is on the main stage. Now we have to insert a keyframe in the next frame. You can do it with your mouse, right click onan empty frame and select Insert Keyframe or use the F6 key on the keyboard.
We arrived the next frame, which was placed our button. If you do not know what a frameis already translating. So the first frame is nothing but the state of our button, in whichnothing happens:) As for the second frame, which is made of a certain action, namely, if the user hovers the mouse on our button should something happen. So if you want to change our button, so that when you mouse over something zadziało modify it somehow.I do so that will turn our gradient in the opposite direction. To do this, use the gradienttool to TRANSFORMATION. If you have already done so let's get to the third frame.Select the third frame and press F6. This cage is responsible for pressing the leftmouse button on your button. I change the color of the string. So if a user clicks on a button, see the writing on the button that will change. Simply select the Selection tool (V) and click twice on the string. You'll find that highlights the lettering on which means thatyou can edit it. On the right is a panel called MARK where you can modify the string. Mythird button in the cage looks like.
It was our last frame in which to select F6 on the keyboard and nothing else we do with itbecause the frame is responsible for "activation" of our button. The point is that therectangle with the gradient will be all over the field where he will appear a "handle" when the user hovers on our button. If you already have everything as it should look like we areon track towards the end:) Now to see how our work we have to move the button on the scene first.
If you are already on the scene of the first / main then we have our button, drag to the Stage from the library. If you do not see this library, you need to go to WINDOW -LIBRARY or CTRL + L and drag the button.
Once you have a button on the Stage, you can see how it works. Choose from the keyboard CTRL + ENTER, and then behaves like your button. I tested it and behaves as it should be, I hope with you it is all right.
I understand from you that everything is working well and would like to lead yousomewhere button:) If so, you can rewrite the script that is in the film at the bottom of the article or use the code snippets that will be a little faster:) So go to WINDOW - code snippets , will appear from which you choose and CLICK TO OPERATIONS GO TOWEB SITE
If you have selected a button, you can double-click on the option you want to give thebutton. I choose the first option which is the first that led me to the website. If you clicktwice, you probably receive a message that your key does not have an instance nameand FLASH to make it alone. Click OK. If you clicked you will see a window with the operations and a piece of script that will transfer us to a website. If you do not want youmoved the button on the Adobe website, type what you want to address.
Now you can test your video and you'll see that everything works as it should! If not, write to me!

Feel free to watch the video!





2 komentarze:

  1. design a business card
    This is a really good read for me. Must agree that you are one of the coolest blogger I ever saw.

    OdpowiedzUsuń
    Odpowiedzi
    1. Thank you for your positive comment. Feel free to read other articles.

      Usuń