# Elastic question

**URL:** <https://forum.kirupa.com/t/elastic-question/179479>\
**Category:** flash\
**Created:** [February 20, 2006, 4:15pm UTC](https://forum.kirupa.com/t/elastic-question/179479 "2006-02-20T16:15:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [February 20, 2006, 4:15pm UTC](https://forum.kirupa.com/t/elastic-question/179479/1 "2006-02-20T16:15:02Z")

</div>

I’m at work right now so i can’t test this out but will this work for an elastic effect? I’m just toying with some ideas.

```auto
import mx.transitions.Tween;
import mx.transitions.easing.*;
var blahx:Number = 300
var blahy:Number = 300
new Tween(blah, "_x", Elastic.easeOut, 0, blahx, 2, true);
new Tween(blah, "_y", Elastic.easeOut, 0, blahy, 2, true);
this.onPress = function(){
     this.startdrag();
}
this.onRelease = function(){
     this.stopdrag();
     var blahfromx:Number = this._x;  
     var blahfromy:Number = this._y; 
     var blahxtween:Object = new Tween(blah, "_x", Elastic.easeOut, blahfromx, blahx, 2, true);
     var blahytween:Object = new Tween(blah, "_y", Elastic.easeOut, blahfromy, blahy, 2, true);
}

```
