This is a discussion on "Button rollout?" within the Flash & Multimedia Forum section. This forum, and the thread "Button rollout? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Button rollout?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Button rollout?
I have made a button. In the overstate of the button I have put in a Movie that fades up and changed the color of the link. I want to, when you rolloff the button, have a Movieclip play fading the color down and back to the original button state. I'm not sure exactly how to do this. If anyone could help me out I'd appreciate it.
Thanks in advance, josh111 |
|
|
|
|||
|
Simply place a movie in the first frame of the button, with the rollout state. The only catch is that this rollout movie also plays when the button first appears.
|
|
|||
|
Thank. One other question, what is the actionscript I would put in the first frame? onRollout for the MC or what?
Thanks, |
|
|||
|
You don't need any actionscript... you simply place the movie inside the button on the appropriate frame...
|
|
|||
|
Dont place your roll in/out movies into the button itself as separate. Your button should have just one move (key frame). Your movie should stop and do nothing (and show nothing) on the fist frame. From fram 2 to 10 (or however long your fadein is) it should do the effect and stop on the last frame. Via ActionScript, on rollover tell your movie to play the fade in via gotoAndPlay(2) and on rollout tell it to play backwards using the following function:
MovieClip.prototype.goback = function(){ this.onEnterFrame = function(){ this.prevFrame(); if (this._currentframe == 1) { delete this.onEnterFrame; } } } You will have to tweak it to your frames, but you get the idea. |
|
|||
|
Quote:
|
|
|||
|
Well maybe what would be interesting is a section where we can upload or in any way host FLA examples?
|
|
||||
|
Quote:
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| button, rollout |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to change button action into a movieclip button action | cjrollo | Flash & Multimedia Forum | 7 | Nov 21st, 2007 17:07 |
| Sliding Bar on Rollover/Rollout | Rick | Flash & Multimedia Forum | 9 | Aug 27th, 2007 23:58 |
| Complex Button RollOver/RollOut Effects Problems. | Toby1979 | Flash & Multimedia Forum | 6 | Jul 13th, 2007 16:12 |
| rollout help | tigas langaw | Flash & Multimedia Forum | 6 | Jul 10th, 2007 16:14 |
| When a button refuses to behave like a button in Flash | autumn_whispers2me | Flash & Multimedia Forum | 2 | May 24th, 2005 22:08 |