all groups > flash actionscript > june 2004 >
You're in the

flash actionscript

group:

360 MPH


360 MPH Dheeraj Mehta
6/15/2004 7:55:55 PM
flash actionscript:
Re: 360 MPH mgnvs
6/15/2004 8:26:45 PM
This code records the position of the mouse and stores the past position. To
calculate speed, take current_x - past_x or current_y - past_y.

this.onEnterFrame = function() {
//set past position
past_x = current_x;
past_y = current_y;

//set current position
current_x = this._xmouse;
current_y = this._ymouse
}
Re: 360 MPH Dheeraj Mehta
6/15/2004 8:32:40 PM
Re: 360 MPH Dheeraj Mehta
6/15/2004 8:33:19 PM
AddThis Social Bookmark Button