# AS Tweening

**URL:** <https://forum.kirupa.com/t/as-tweening/213914>\
**Category:** Uncategorized\
**Created:** [January 24, 2007, 6:46am UTC](https://forum.kirupa.com/t/as-tweening/213914 "2007-01-24T06:46:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matix](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@matix](https://forum.kirupa.com/u/matix)\
**Post date:** [January 24, 2007, 6:46am UTC](https://forum.kirupa.com/t/as-tweening/213914/1 "2007-01-24T06:46:07Z")

</div>

Hi,

I got the following code using the tweening classes to move the clip “back” to 0,0 when clicking “btn1”:

```auto
import mx.transitions.Tween;  
import mx.transitions.easing.*;
myTweeningX = new Tween(back, "_x",Strong.easeInOut, 0, 0, 1, true);
myTweeningY = new Tween(back, "_y",Strong.easeInOut, 0, 0, 1, true);
btn1.onRelease=function(){
	myTweeningX.continueTo(0);
	myTweeningY.continueTo(0);
}

```

I want to add som code that randomly moves “back” to either 0,0 or let’s say 500,100 when “btn1” is clicked.  
Hope someone can assist me on this.

Thanks!
