As a topic say it is simple so let's start with making our simple button. Now all you need is;
1. Make something that you want to turn into a button
2. Select that "something" and press "F8" hotkey or if you don't like hotkeys go on Modify/Convert to Symbol...
3. When a popout window shows up select Button and press OK
So as you can see timeline is difirent(if it isn't double click that button or right click/edit). Now I need to explain frames
Up frame - in this frame you have your button when there is no interaction with him(like mouse isn't over it)
Over frame - this shows up when mouse cursor is over a button
Down frame - and this is what you see when you click on a button
Hit frame- this frame is nothing more then just an area with interaction (you make that area by drawing something)
Simple, eh?
2. A bit Advanced buttons
All difirence between simple buttons and this one is that this one contains Movie Clips in "Up", "Over" and "Down"
frames, so all you need to do is make some animation in Movie Clips and you will have an animated button like that
3. More Advanced buttons
This isn't a button like these 2 before, it is a Movie Clip. So now you make some animation in that Movie Clip like...
Color changing from bright to dark, Door opens, flower grows, you get my point. Now you have to add some Action
Script in that Movie Clip and codes goes like this;
onClipEvent(load)
{
iamoveru=0
}
on(rollOver)
{
iamoveru=1
}
on(rollOut)
{
iamoveru=0
}
onClipEvent(enterFrame)
{
if(iamoveru==1)
gotoAndStop(_currentframe+=1);
else if(iamoveru==0)
gotoAndStop(_currentframe-=1);
}
iamoveru or "I am over you" is a variable loaded on start as 0 and if value changes to 1 it means that mouse is over
a button and button goes in next frame and the same story is with 0 and going back.
Holy sh... cow! I forgot to explain how codes work for simple buttons... Basicly all you need to do is click on your button
and open Action Script couse here are some codes you might find usefull;
on(release)
{
getURL("http://www.how2flash.com/forum");
}
this code above will take you to how2flash forum but this one...
on(release)
{
play();
}
will play your movie, I think this is more about logical thinking so I'll let you explore a bit on your own and remember...
Action Script is just a script
discuss this topic to forum
