Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

FPS Drop when click to stage

Explorer ,
Sep 25, 2018 Sep 25, 2018

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.

TOPICS
ActionScript
267
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 26, 2018 Sep 26, 2018
LATEST

that code does the same with a mousedown that it does with no mouse events.  (ie, click events don't execute on mousedown.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines