# Animated Rollover Button Using Tween Class Actionscript Problem

**URL:** https://forum.kirupa.com/t/animated-rollover-button-using-tween-class-actionscript-problem/236133
**Category:** flash
**Created:** [August 17, 2007, 1:47pm UTC](https://forum.kirupa.com/t/animated-rollover-button-using-tween-class-actionscript-problem/236133 "2007-08-17T13:47:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_Goudie](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@Sam\_Goudie](https://forum.kirupa.com/u/Sam_Goudie)
#### Post date: [August 17, 2007, 1:47pm UTC](https://forum.kirupa.com/t/animated-rollover-button-using-tween-class-actionscript-problem/236133/1 "2007-08-17T13:47:20Z")

</div>

Hey guys,

I’ve created a rollover button that makes a little pink tab pop up on rollover and drop down using rollout.

The animation looks pretty sweet because it’s done with the tween class. Heres the code:

[FONT=“Courier New”]on (rollOver) {  
import mx.transitions.easing.\*;  
import mx.transitions.Tween;  
var portfolioRollover:Tween = new Tween(clicktoviewtab, “\_y”, mx.transitions.easing.Back.easeOut, 58, 42, 10, false);  
}

on (rollOut) {  
var portfolioRollover:Tween = new Tween(clicktoviewtab, “\_y”, mx.transitions.easing.Back.easeIn, 42, 58, 7, false);  
}[/FONT]

Problem is, if you rollover and roll off quickly it gets stuck. Not really sure why! Any ideas?

cheers

Sam
