# Tween Class

**URL:** <https://forum.kirupa.com/t/tween-class/114436>\
**Category:** Uncategorized\
**Created:** [June 28, 2004, 4:55pm UTC](https://forum.kirupa.com/t/tween-class/114436 "2004-06-28T16:55:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chapster](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@chapster](https://forum.kirupa.com/u/chapster)\
**Post date:** [June 28, 2004, 4:55pm UTC](https://forum.kirupa.com/t/tween-class/114436/1 "2004-06-28T16:55:15Z")

</div>

I am using the new flash Class easing tweens.  
I imported the classes and then I made a function to take care of all my slides.

```auto

function slideMe(mc:MovieClip, prop:String, begin, finish, spd:Number) {
var tw = new Tween(mc, prop, Elastic.easeInOut, begin, finish, spd, true);
}

```

Then on my Button I call the function with this.

```auto

_root.slideMe(sectionPanel_intro, "_y", sectionPanel_intro._y, 443, 2);

```

This all works but the only parameter I can’t pass is the function, which would be easIn, easeOut, Strong.ease ect.  
When I pass this it works but not with ease why is this.

Also is this the best way to approach this or is there a better way.

If I’m going to do it this way by having a wrap around function that takes care of the new class Tween then is there a way in this code of tweening the x and y at the same time without setting up another slideMe function for  
x to be called at the same time as y.

Thanks,  
Eric
