Skip to main content
Inspiring
June 26, 2017
Question

Ralentissement application lors d'un touch event AS3 Air for Android

  • June 26, 2017
  • 1 reply
  • 380 views

Hello,

I have a problem with development of a little game for Android with Animate CC.

I have a scrolling background with platforms and a button with "touch event". Every time i click on the button, the game become slow for 1 seconde even if the function 'touch event" is empty. This is just the touch which make the game slowly.

In PC the game works perfectly.

This is my script :

// Code pour le défilement du parcours

MyBackground.addEventListener(Event.ENTER_FRAME, defiler);

function defiler(e:Event)

{

  MyBackground.x-=5;

}

// Code bu bouton

MyButton.addEventListener(TouchEvent.TOUCH_TAP,jump);

function jump(e:Event)

{

}

Thanks pour your help !

This topic has been closed for replies.

1 reply

Colin Holgate
Inspiring
June 26, 2017

I don't see why it would go slower. Some people using the Citrus engine have had that problem, are you using big libraries, or does the slowdown happen even in a bare bones test?

Here's an example Citrus discussion:

https://forum.starling-framework.org/topic/is-there-any-reason-why-when-i-touch-the-screen-game-slows-down-15fps

Inspiring
June 26, 2017

Thanks for your answer !

I have tested with only a background and a button in the scene.

The problem is the same....with a MouseEvent.Click too on PC. When i test with simple AS3 (swf) and not on Air For Android mode this works perfectly.

I don't understand what is the problem exept a bug in adobe air...

Inspiring
June 28, 2017

It's Good !!

I have finally found the solution in other forum.

For my test, i used a symbole type "button" for the clickable zone andt this is the cause of lag...

When i use a symbole type "clip" for the clickable zone, there is no problem....