FPS Drop when click to stage
I did one button that when user click to stage, the character execute one jump...
But, when the button is held down, the FPS from my APP is decreased.
Can someone help me?
Code:
stage.addEventListener(MouseEvent.CLICK, jump);
character.speedY = 0;
character.impulso = 5;
function jump (Event:MouseEvent) : void {
character.speedY -= character.impulso;
}
There is an ENTER_FRAME that causes the character to always be pulled down:
character.y += character.speedY;
But my problem is only when the character does the jump animation, the FPS falls absurdly and then normalizes.