# Help with the Tween Class

**URL:** https://forum.kirupa.com/t/help-with-the-tween-class/271061
**Category:** Uncategorized
**Created:** [September 17, 2008, 10:31pm UTC](https://forum.kirupa.com/t/help-with-the-tween-class/271061 "2008-09-17T22:31:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bostondesign](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bostondesign](https://forum.kirupa.com/u/bostondesign)
#### Post date: [September 17, 2008, 10:31pm UTC](https://forum.kirupa.com/t/help-with-the-tween-class/271061/1 "2008-09-17T22:31:50Z")

</div>

Hey All,  
Im in some need of help here, Im just starting to learn the tween class and am having an issue. Im trying to do a bunch of photos stacked on top of each other so you can move them apart. Im having issues with the math. On the release i want it to have the effect of sliding a bit with an ease out in the same direction that it was pulled in.

Thanks in advance.

import mx.transitions.Tween;  
import mx.transitions.easing.\*;  
//

large1.onPress = function() {  
this.startDrag(false, 328.8, 253.9, 1039.5, 609.2);  
};

var endx:Number = (\_x + 10);  
var endy:Number = (this.\_y);

large1.onRelease = large1.onReleaseOutside = function() {  
var t = new Tween(this, “\_x”, Regular.easeOut, this.\_x, endx, 2, false);  
var t1 = new Tween(this, “\_y”, Regular.easeOut, this.\_y, endy, 2, false);  
stopDrag();  
};

stop();
