# Position as a function of time. How?

**URL:** https://forum.kirupa.com/t/position-as-a-function-of-time-how/46629
**Category:** flash
**Created:** [March 26, 2004, 7:56am UTC](https://forum.kirupa.com/t/position-as-a-function-of-time-how/46629 "2004-03-26T07:56:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mx\_guest2004](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@mx\_guest2004](https://forum.kirupa.com/u/mx_guest2004)
#### Post date: [March 26, 2004, 7:56am UTC](https://forum.kirupa.com/t/position-as-a-function-of-time-how/46629/1 "2004-03-26T07:56:54Z")

</div>

I am new to AS and a little confused about the relation between position and time in AS.  
If we have this code :  
[AS]  
onClipEvent(enterFrame) {  
speed = 1;  
this.\_x += speed;  
}  
[/AS]

and a framrate 16 fps, how can we calculate the time it takes to move the MC from position A to position B ?  
I mean how can vi control the speed here as a function of time (say as a function av fps) ?

Thanks for helping me with this.

mx-guest2004  
=)
