Rollover graphic buttons in flash

  • MichaelJM
  • Novice
  • Novice
  • MichaelJM
  • Posts: 18

Post 3+ Months Ago

How would i make a rollover button like the ones on http://www.tiburon.com ?

Thanks.
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

i know this has been answered elsewhere, but i can't find the thread, so...

insert a new movieclip...
make an animation going in one direction...
in this case, the background image gets brighter, the logo drops down, a message pops up...

put a stop(); tag at in the first and last frames of the movieclip.

the put the movieclip wherever you want the button to be in your main (_root) movie, select it, and put this script on it:

Code: [ Select ]
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
  1. onClipEvent (enterFrame) {
  2. if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
  3. this.nextFrame();
  4. } else {
  5. this.prevFrame();
  6. }
  7. }


this makes it play forward to the end when you mouse over it, and backward to the beginning when your mouse leaves it...

if you want to make it functional, put something like this right before the "if" statement:

Code: [ Select ]
this.onRelease = function(){
getURL("http://www.whateveryoudamnwellplease.com/");}
  1. this.onRelease = function(){
  2. getURL("http://www.whateveryoudamnwellplease.com/");}


it doesn't have to be getURL, but you get the picture...

peace out.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.