Rollover graphic buttons in flash

  • MichaelJM
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 01, 2005
  • Posts: 18
  • Status: Offline

Post March 24th, 2005, 7:29 pm

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

Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 24th, 2005, 7:29 pm

  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Joined: Oct 12, 2004
  • Posts: 861
  • Loc: BKNY
  • Status: Offline

Post March 25th, 2005, 8:55 am

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 29 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.