# How would YOU get the current velocity of a tweening object?

**URL:** <https://forum.kirupa.com/t/how-would-you-get-the-current-velocity-of-a-tweening-object/316458>\
**Category:** flash\
**Created:** [November 22, 2010, 3:37pm UTC](https://forum.kirupa.com/t/how-would-you-get-the-current-velocity-of-a-tweening-object/316458 "2010-11-22T15:37:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abrandao](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@abrandao](https://forum.kirupa.com/u/abrandao)\
**Post date:** [November 22, 2010, 3:37pm UTC](https://forum.kirupa.com/t/how-would-you-get-the-current-velocity-of-a-tweening-object/316458/1 "2010-11-22T15:37:35Z")

</div>

We got an object tweening from point A to point B, and we can learn a few things from it using the onUpdate function.

The program can be constantly storing it’s actual x/y position and compare it to the previous position, versus time elapsed.

I’ve seen several approaches but none seemed very impressive.

Also, perhaps there is an engine (or more) that can return the object’s current speed via the unUpdate function. Or not?

* * *

How would YOU retrieve the object’s current speed/velocity (pixels per second or millisecond) during a tween ?
