Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advanced Flash Button (smooth rollOut)

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I know how to make an animation play on the Over Frame when making a button, however I want to know how to make a smooth rollOut when the mouse hovers off the button. I was wondering if there is a way of telling flash to go to the end of the movie i have as my Over State and play it backward...... or tell it to play another movie clip that i have made which is exactly the reverse of my Over Stage Movie Clip. Either way, I dont know how to perform this..

thx

any help will be appreciated
 
So if I understand this correctly, let's say your button fades out on the over, then fades in on the out. If the user quickly passes his mouse over the button it will jump to the fade in without ever having faded out all the way.

For something like that, you would have to use AS instead of just telltargeting an MC (which I presume you are doing).

Is that right?
 
The reverse play effect would be the smoothest! But it won't work in a movie clip in the over state of your button.
You need a seperate button and movie clip, both on stage. the movie clip has to have an instance name, you will refer to in your button script to control it. Regards,

new.gif
 
The button can be a movie instead :

Code:
onClipEvent (onMouseDown) {
    if (hitTest (_root._xmouse, _root._ymouse)) {
        _root.gotoAndPlay (1);
    }
}
onClipEvent (enterFrame) {
    if (hitTest (_root._xmouse, _root._ymouse)) {
        gotoAndStop (_currentfame+1);
    } else {
        gotoAndStop (_currentfame-1);
    }
}
Regards

David Byng

spider.gif


davidbyng@hotmail.com
 
The button can be a movie instead :

Code:
onClipEvent (mouseDown) {
    if (hitTest (_root._xmouse, _root._ymouse)) {
        _root.gotoAndPlay (1);
    }
}
onClipEvent (enterFrame) {
    if (hitTest (_root._xmouse, _root._ymouse)) {
        gotoAndStop (_currentfame+1);
    } else {
        gotoAndStop (_currentfame-1);
    }
}
Regards

David Byng

spider.gif


davidbyng@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top