I am trying to program a game where a character moves faster, the faster the
player moved the mouse left and right. A bit like the old Dailey Decathlon
Game where you had to hit 2 keys on the keyboard on after the other as fast
as you can to control the speed of say a character running.

I could do with some advice on how to achieve this.

I have a frame rate of 31 FPS, with a movie width of 600 pixels.

Currently I am calling a function every 10ms to calculate the speed

objShowerGame.updateSpeedInterval = setInterval(updateSpeed, 10);


I compare the previous mouse X position with the current one and use this
difference as the speed.

This isn't really working so I could do with some suggestions.

Thanks

Paul

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to