First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Jim Tudesco | Website: http://www.Withabee.com

So what's the catch?

The animation only works if the user scrolls off of the button onto an area of the movie. This means that if your button is up against the side of the movie and the user scrolls of the button to an area that is not part of the movie the button will remain in the up position until the mouse is returned to the stage. In the example below you will notice that if you rollover the button to the right, off of the movie itself, the button remains in the up position whereas if you rollout to any area on the rest of the movie it works fine:


The reason for this lies in the _root._xmouse and _root._ymouse part of the code. Those two functions return the position of the mouse when the mouse is over the movie. As soon as the user scrolls out of the movie the functions freeze on the last known coordinates of the mouse. So if the last known coordinates of the mouse were over our movie clip button then movie considers the mouse as still being there.

Which means that if you wanted the "button" to be the same size as the movie, so that you could make all your buttons in this fashion and then bring them into another program such as dreamweaver, they wont animate back at all. That is why this section is called "Buttons for sites entirely in flash". If you want to know how to make them work and be the same size as the stage then continue on to the next section.

» Level Intermediate

Added: 2002-06-26
Rating: 8 Votes: 119
(10 being the highest)
» Author
Freelance flash designer.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.