Newest Articles

MegaCombs
Flash Media Player
XML Driven Pie Chart
Base Defender
Hangman Game
8 Ball Pool


Popular Articles

True Fullscreen Flash Mode
Mp3 Player with XML Playlist
Image Slider
Flash Media Player
3d Rotating Image Cube
FLV Player


Random Articles

Combs
Hangman Game
Gilbert
Storing Data Similar to Cookies
Mouse Following Preloader
Music Player


Links

Foundation-Flash
MickM
TutorialQuest
Tutorialsphere.com - Free Online Tutorials
Newgrounds
TWiT
Link to SwfSpot
Swf Spot



rss feed

Disappearing Button

Disappearing Button
AddThis Social Bookmark Button
Description: Creating a button that fades out on mouse over
Author: John Bezanis
Added: January 29th 2007
Version: Flash 8


Disappearing Button
Select the Rectangle Button and draw a rectangle on the stage. Select the Selection Tool and single click the rectangle. Right-click Convert to Symbol. Set the type to button and the name to buttonbutton. Single-click the newly created button and insert the following code into the Actions tab:
  1. on(press){
  2.   getURL("http://www.swfspot.com", "_self");
  3. }
Right-click the button and hit convert to symbol. Set the name to buttonmovie, the type to Movie Clip, click Export for ActionScript, and click ok. Check to see if the timeline is at Scene 1. Click the rectangle and in the Actionscript section, type the following:
  1. onClipEvent(enterFrame){
  2.   if(this.hitTest(_level0._xmouse,_level0._ymouse)){
  3.     if(this._alpha>0){
  4.       this._alpha-=5;
  5.     }
  6.   }else{
  7.     if(this._alpha<100){
  8.       this._alpha+=5;
  9.     }
  10.   }
  11. }
That's it. The source file is available below for download.

Download Source File
Comments
Hey, when I download the file, it appears to be pong...
I need this source file.
December 24th 2008 04:12PM   -   aledTH
It doesn't work either. What am I doing wrong? No output errors. I've missed out the link. Is that a problem? I'm actually reversing it so that it fades in when you hover your mouse over.
December 24th 2008 05:12PM   -   aledTH
It works now, but I want it to fade in when you hover your mouse over it. I tried changing the numbers, no errors, but it didn't do anything! Could you show me how to make a button appear?
December 24th 2008 05:12PM   -   aledTH
click herre :D=oD
November 5th 2009 12:11AM   -   lilo
I have bookmarked your site. Thanks for sharing
December 13th 2009 08:12AM   -   dental
i like this post!
January 4th 2010 02:01AM   -   Bride dresses
Thanks for sharing these info with us! I was reading something similar on another website that i was researching. I will be sure to look around more. thanks...
January 15th 2010 08:01PM   -   evening dresses
I agree with you, its helpful for my project
January 23rd 2010 01:01AM   -   cheap cricket phones
It's nice tutorial
January 24th 2010 07:01AM   -   evening dresses
This is something for everyone
January 24th 2010 09:01AM   -   Acai Berry 5
Disappearing Button is easy to adapt.
January 25th 2010 11:01PM   -   book
This is the informative tutorial. Thank you for sharing.
January 25th 2010 11:01PM   -   film
Special thank for good post.
February 5th 2010 09:02PM   -   à¹‚หลดเพลงà
Thank for the information
February 6th 2010 07:02AM   -   à¹‚หลดเพลงm
Special thank for good post.
February 10th 2010 03:02AM   -   à¹‚หลดเพลงà
Special thank for good post.
February 10th 2010 08:02AM   -   à¹‚หลดเพลงà
Add a Comment
name:
website (optional):
captcha type the characters into the box
message (5000 characters or less):