# Difference tween gone curvy?

**URL:** https://forum.kirupa.com/t/difference-tween-gone-curvy/195855
**Category:** flash
**Created:** [August 3, 2006, 4:29pm UTC](https://forum.kirupa.com/t/difference-tween-gone-curvy/195855 "2006-08-03T16:29:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)
#### Post date: [August 3, 2006, 4:29pm UTC](https://forum.kirupa.com/t/difference-tween-gone-curvy/195855/1 "2006-08-03T16:29:01Z")

</div>

Alright, so with a basic difference tween, we can animate one value to another.

```auto

this.onEnterFrame = function (){
     difX = (targetX - myObject._x)
     myObject._x += difX / speed
}

```

How would one curve it to that position? I want the starting and ending points to be the same, but with some fun curving in the middle.
