Quantcast
Channel: Adobe Community : Popular Discussions - AIR Development
Viewing all articles
Browse latest Browse all 24121

IOS touch performance

$
0
0

Hi, I've found a few threads on this though none which really seem to have a solution

 

Basically it seems like with no mouse or touch listeners, and all objects (including stage) having mouseChildren as false and mouseEnabled as false (not stage as not supported) there is a significant frame rate drop when you touch the screen.

 

I've been testing the below in CS6 and CC, with AIR 3.4, 3.6 and the latest 3.8 beta, all on a 3GS.

 

I have a very basic FLA with around 30 animated movieclips that simply loop and a single text field.

 

I've set stage.mouseChildren=false;

 

And to double confirm, looped through all movieclips on screen and set their mouseEnabled and mouseChildren to both false

 

On my 3GS, the AIR app runs at about 45 - 47fps.

 

However, when I tap the screen, or drag my finger around, it drops to closer to 35fps. Considering I don't have any touch or mouse listeners, this seems odd.

 

Here is the complete code I'm using (straight in the timeline), the enterframe loop simply averages out the last 10 frames in terms of ms to render.

 

import flash.events.Event;

import flash.utils.getTimer;

stage.mouseChildren=false;

for(var a:int=0;a<stage.numChildren;a++)

{

          MovieClip(getChildAt(a)).mouseEnabled=false;

          MovieClip(getChildAt(a)).mouseChildren=false;

}

addEventListener(Event.ENTER_FRAME,enterframe)

var avg:int=0;

var st:int=getTimer();

var at:int=0;

 

function enterframe(e:Event):void

{

                    avg++

                    at+=getTimer()-st;

                    if(avg==10)

                    {

 

                              tf.text=String(int(at/10));

                                        at=0;

                              avg=0;

                    }

 

                    st=getTimer()

}

 

If anyone knows a solution, that would be great


Viewing all articles
Browse latest Browse all 24121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>