Roll Out in Flash
- Started
- Last post
- 7 Responses
- Meeklo
Ok, I have a button, lets say a square, it zooms in when you roll over it, how do I make it zoom back out, when I roll out of the button?
thanks for the help in advance!
- JazX0
do the opposite of what you programmed or ask unfittoprint.
- unknown0
easy, as far as I ever did it it was with variables.
set it to play the first part and stop, and when you roll out it sets another and plays the part you need it to and resets.May be a different way but that's the way I've done it in the past.
- unfittoprint0
imagine your rollmovie inside a movieclip acting as a button. Call it rollMC.
//inside the movieclip button
rewind= function(){
if(rollMc._currentframe != 1){
rollMC.gotoAndStop(rollMC._curre...
} else {
clearInterval(rewindLoop)
}//rollOut function
this.onRollOut = function(){
clearinterval(this.rewindLoop);
this.rewindLoop = setInterval(this, "rewind", 30)
}//the other way is to make a zoom in/ zoom out function, changing dinamically the _xscale/_yscale; there's a lot scripts available.
- Pixter0
super easy way:
Make the Zoom out animation in the UP frame of button.
another way:
Put the button inside a MovieClip, and this on the action of the MC
onClipEvent (load) {
size = 100;
}
onClipEvent (enterFrame) {
this._xscale += (size-this._xscale)*0.2;
this._yscale += (size-this._yscale)*0.2;
}and for button this
on (rollOver) {
size = 150;
}
on (rollOut) {
size = 100;
}
- Meeklo0
Ok, first of all, thanks for the help, I do have to say that for a person like me, this is harder than learning mongolian.
I know Pixter took it down a notch, can anybody beat him?The way I usually do is create a movie clip that goes in the ON instance of the button, for the roll over, but then I have no roll out.
Im going to see if that last one works!
thanks
- Meeklo0
bump