Highlighted

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

Explorer ,
Jun 26, 2017

Copy link to clipboard

Copied

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 !

TOPICS
Development

Views

211

Likes

Translate

Translate

Report

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

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

Explorer ,
Jun 26, 2017

Copy link to clipboard

Copied

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 !

TOPICS
Development

Views

212

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 26, 2017 0
Adobe Community Professional ,
Jun 26, 2017

Copy link to clipboard

Copied

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-slow...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 26, 2017 0
Explorer ,
Jun 26, 2017

Copy link to clipboard

Copied

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...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 26, 2017 0
Explorer ,
Jun 28, 2017

Copy link to clipboard

Copied

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....

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 28, 2017 0