button fading out

  • brettbash
  • Novice
  • Novice
  • User avatar
  • Posts: 16

Post 3+ Months Ago

i have a button have a glow fade in in the "over" section, but im wanting it to fade out after the cursor has left the button. how would i go about doing this?
  • brettbash
  • Novice
  • Novice
  • User avatar
  • Posts: 16

Post 3+ Months Ago

ok i found this by an original post by josh111 at http://www.ozzu.com/flash-forum/button-rollover-rollout-t40557.html then i read what roarmeow replyed on and hat pretty much what i was looking for. i was wondering if i put that code in the movie clip that is embedded in the main timeline>button>over>movie clip. the movie clip at the end is where i am supposed to put the code says roarmeow?

Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

for this, you don't need to put the movieclip inside of a button... it's probably better that way anyways...

just place your movieclip on the timeline where the button would be and pin this script to it.
if you need to have it execute something when released do it like this:
Code: [ Select ]
onClipEvent (enterFrame) {
onRelease.gotoAndPlay("_root.blah");
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
  1. onClipEvent (enterFrame) {
  2. onRelease.gotoAndPlay("_root.blah");
  3. if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
  4. this.nextFrame();
  5. } else {
  6. this.prevFrame();
  7. }
  8. }


where onRelease.gotoAndPlay("_root.blah"); is whatever actual action you want the button to execute.

is that clear?

'cos i'm not clearheaded... saturday night... yeeeeaah

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 7 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
 
cron
 

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