# Tween Class

**URL:** <https://forum.kirupa.com/t/tween-class/177990>\
**Category:** Uncategorized\
**Created:** [February 7, 2006, 12:28am UTC](https://forum.kirupa.com/t/tween-class/177990 "2006-02-07T00:28:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![missworld52](https://avatars.discourse-cdn.com/v4/letter/m/bcef8e/32.png) [@missworld52](https://forum.kirupa.com/u/missworld52)\
**Post date:** [February 7, 2006, 12:28am UTC](https://forum.kirupa.com/t/tween-class/177990/1 "2006-02-07T00:28:16Z")

</div>

Hi,

I was doing a tutorial from this website… the one on the tween class… I am trying to learn it…

So I downloaded the example… I was trying to add some of my own code and it is not working as I expected. I was wondering if anyone had any insight into this…

the code:

import mx.transitions.Tween;  
import mx.transitions.easing.\*;  
var xPosT:Tween = new Tween(frame1, “\_x”, Regular.easeOut, -150, Stage.width / -13, 1, true);  
var yPosT:Tween = new Tween(frame1, “\_y”, Regular.easeOut, -600, Stage.height / -62, 1, true);  
xPosT.onMotionFinished = function() {  
this.continueTo(Stage.width / -13, 1);  
};  
yPosT.onMotionFinished = function() {  
this.continueTo(Stage.width / -62, 1);  
};

My movie clip is called “frame one”  
The tweening works fine along the x axis… which is what was on the tutorial… the movie clip does not stop where I want it along the \_y axis…  
I want it to stop at -62 (this is because the graphic is slightly larger than the movie itself)

Instead of stopping at -62 along the y axis, it keeps going from -300 to 0 on the y axis…

does anyone know how this works?  
many thanks
