• Home
  • Free Tutorials
  • Free Video Tutorials

Adobe Photoshop
Autodesk 3ds Max
CSS
Flash
Help Center Live
iPhone
Joomla
Make Money Online!
Mambo
mIRC
Outlook Express
SEO / SEM
Simple Machine Forum
Target Explorer

Buttons

Category : Flash Views : 19751
Version : 8 Rating : 
2.7/5 (37 votes)
  • Currently 2.73/5
  • 1
  • 2
  • 3
  • 4
  • 5
Type : Text Source File: buttons.zip
Result: See the result


Buttons simple to use, create and one of the most useful things in Flash. Let痴 start by creating a button.

Right click inside the library tab and select "New Symbol..."
Free Flash Tutorials, Basic Flash, Buttons
Don稚 forget to check "Button" and to give it a name.

I may have noticed that the timeline is different from the usual. This one only has four frames: "Up", "Over", "Down" and "Hit". They represent the states of the button.
Free Flash Tutorials, Basic Flash, Buttons

On the "Up" frame you draw how you want your button to look like when it痴 not being clicked and doesn稚 have the mouse over it.
If you want to make more complex buttons you can add more layer to the timeline just line for a Movie Clip. In fact, you can also add a Movie Clip inside your Button! Try later to animate a Movie Clip and drag it to one of your button痴 frame. Free Flash Tutorials, Basic Flash, Buttons

The "Over" frame is how you button looks when the mouse is over it, but not clicking.
Free Flash Tutorials, Basic Flash, Buttons

"Down" frame is your button when the mouse is being pressed over it.
Free Flash Tutorials, Basic Flash, Buttons

And "Hit" is the area where the mouse events occur.
So if you draw a smaller button on this frame, the over and down event will only happen if the mouse is in that small area. For our tutorial leave this frame empty.

Now let痴 move to the actionscript part.
The main events for buttons are:
//When the mouse is pressed over the button. onPress = function() { } //Mouse was pressed in the button then released. onRelease = function() { } //Mouse pressed over the button then released outside the button. onReleaseOutside = function() { } //Mouse rolls over the button. onRollOver = function() { } //Mouse rolls out. onRollOut = function() { }
Just add your code between the curly braces and test it.

That痴 all for this tutorial.

More cool tech articles from other blogs.

Place your ad here
Loading...

How to Video Tutorials on software by Helpvids.com

Sponsors





Web Hosting - Standard Package
Studio | Advertisement | About Webzo | Contact Webzo | Terms of Use | Free Video Tutorials by Helpivds

Copyright © 2007 NR Concepts Ltd. All rights reserved.