# Simple tween class question

**URL:** <https://forum.kirupa.com/t/simple-tween-class-question/178118>\
**Category:** Uncategorized\
**Created:** [February 7, 2006, 8:14pm UTC](https://forum.kirupa.com/t/simple-tween-class-question/178118 "2006-02-07T20:14:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtrace](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dtrace](https://forum.kirupa.com/u/dtrace)\
**Post date:** [February 7, 2006, 8:14pm UTC](https://forum.kirupa.com/t/simple-tween-class-question/178118/1 "2006-02-07T20:14:34Z")

</div>

How do I use the tween class so that my object animates when a button is pressed…or rolled over.  
It seems like the coding is meant to just move the object …

import mx.transitions.Tween;  
import mx.transitions.easing.\*;  
new Tween(ball\_MC, “\_x”, Elastic.easeOut, 0, 300, 3, true);

I’d like to have this ‘ball\_MC’ move when a certain movieclip or button is rolled over.  
How do I do this?  
Thanks.
