# Adding a tweening class help

**URL:** <https://forum.kirupa.com/t/adding-a-tweening-class-help/285472>\
**Category:** flash\
**Created:** [April 1, 2009, 9:59am UTC](https://forum.kirupa.com/t/adding-a-tweening-class-help/285472 "2009-04-01T09:59:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrT](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@MrT](https://forum.kirupa.com/u/MrT)\
**Post date:** [April 1, 2009, 9:59am UTC](https://forum.kirupa.com/t/adding-a-tweening-class-help/285472/1 "2009-04-01T09:59:32Z")

</div>

Hello, hopefully someone can help me integrate a tweening class into my old method of making objects do stuff. I am a designer so its a pretty useful way of making things happen quickly but would really like more options in terms of animation.

For example… I know how to make one object do something…

```auto

import mx.transitions.easing.*; 
import mx.transitions.Tween; 
objectTween = new Tween(object, "_x", Back.easeInOut, 10, 150, 30);

```

…but I would like it to work with something like this rather than using this old easing script.

```auto
myObject.onEnterFrame = function() {
	if (option == "op1") {
		this._x = ((0-this._x)/4)+this._x;
	}else if (option == "op2") {
		this._x = ((50-this._x)/4)+this._x;
	}
};

```

If someone could just show me how to mash the two together that would be really cool and make my life a lot easier.  
Thankyou!
