# Tween classes!

**URL:** <https://forum.kirupa.com/t/tween-classes/267027>\
**Category:** flash\
**Created:** [July 27, 2008, 6:42pm UTC](https://forum.kirupa.com/t/tween-classes/267027 "2008-07-27T18:42:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mesilane](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@Mesilane](https://forum.kirupa.com/u/Mesilane)\
**Post date:** [July 27, 2008, 6:42pm UTC](https://forum.kirupa.com/t/tween-classes/267027/1 "2008-07-27T18:42:54Z")

</div>

I’m creating an animation using actionscript (mx.transitions.Tween)…

What i want to create is animation (animation box is created via beginFill, lineTo and moveTo… you know) when I roll over an instance… i’m doing it following code:

```auto
 
var tweenY = new mx.transitions.Tween(this.link, "_height", mx.transitions.easing.Strong.easeOut,0 , 100, 0.5, true);

```

…so far so good…

BUT, when i roll out from the instance, i want to move the box down (instead of back to up) while it’s height decrease to zero again. I can’t just reverse the animation - it would go back up.

One solution would be using 2 different animation at the same time - \_y and \_height. But there comes a problem. When I’m fast enough (roll over, then roll out and roll over again before the animation of rolling out ends, it… will be a mess).

… one idea was to change the registration point of a animation object… but how can i do that?
