I’ve got a movie clip that I am rotating with the left and right arrow keys and it seems to be a bit buggy. Here’s the code:
var keyListener:Object = new Object();
Key.addListener(keyListener);
keyListener.onKeyDown = function(){
if(Key.isDown(Key.RIGHT)){
rotateContainer_mc.nextFrame();
}
else if
(Key.isDown (Key.LEFT)) {
rotateContainer_mc.prevFrame();
};
};
In each frame it is rotated one degree and it rotates 15 degrees. But sometimes, instead of fifteen key strokes, it will rotate the whole range in 5 or even 3 keystrokes. Very frustrating! Is there a better solution for this?