Frame rate issues, particularly on mouse movement

Hi All,

I’ve been browsing through these forums and have already found lots of ways to optimize my frame rates for a game I’ve been working on:

http://www.dukesbox.net/dev/game18.php

The improvements have gone quite well so far, the major problem I’m having though is that when a user moves their mouse across the game, frame rates slow / the whole thing comes to a halt. I cant work out exactly why this is…

Any thoughts on this problem or any other advice people might have for me to speed up my game would be greatly appreciated…