Skip to main content
Participating Frequently
February 5, 2012
Question

Flash on Motorola Xoom don't handle multitouch and performes poorly

  • February 5, 2012
  • 8 replies
  • 1568 views

First of all - Hello everyone

Strange things are going on my motorola xoom with fp 11.1 and AIR 3.1.0.557

Starting from blank AIR template, I perform a check for transformGestureEvent

("bit" is a bitmap that I have on stage)

if (Multitouch.supportsGestureEvents)

                              {

                                        bit.addEventListener(TransformGestureEvent.GESTURE_PAN, handlePan);

                                        bit.addEventListener(TransformGestureEvent.GESTURE_ROTATE, handleRotation);

                                        bit.addEventListener(TransformGestureEvent.GESTURE_SWIPE, handleSwipe);

                                        bit.addEventListener(TransformGestureEvent.GESTURE_ZOOM, handleZoom);

                                        debugField.text = "I can handle this: "+ Multitouch.supportedGestures

                              } else {

                                        debugField.text = "sorry bro, no can do";

                              }

When I publish swf on my notebook it says it supports all the gestures, but when I transfer swf file to my tablet and then run it -  i receive an info, that Multitouch doesn't support TransformGesture Events.

I thought that it may be caused by the fact, that I run swf file, not an android app -  so  I made one and it said, that it supports, but i didn't respond to functions like this

private function handlePan(e:TransformGestureEvent):void

                    {

                              debugField.text = "panning: offset x is: " + String(e.offsetX) + " offsety is: " + String(e.offsetY);

                              bit.x += e.offsetX;

                              bit.y += e.offsetY;

                    }

Nothing. Not event a text in debugTextField

Second thing:

I made a simple swf, that responds to TouchEvents and it runs at 8-9 fps max (fla file is set to 30).
The same thing happens when viewing flash ads in the browser.

(I checked memory, and background applications - I have usually 300-400 MB or RAM available)

Thanks in advance for any help

This topic has been closed for replies.

8 replies

Participating Frequently
March 7, 2012

I have created several test apps and it seems to be swf problem. Performance is poor when I lauch *swf file. When packaged into apk file performance is pretty good, although tweening blur on a 1280x720 bitmap drops to 1-2 frames on CPU, and when set to GPU, there's no blur ( like if device was aware that it can't handle the blur, so it turns it off)

Anyway, lesson learned is: forget about runnig swf files. APK is the only way to go.

Inspiring
February 13, 2012

Hey so I dont have the answer to your question, but I wanted to add one thing about the xoom, my memory was a little fuzzy before, stage quality made a difference but the real big one for me on the xoom was setting color depth to 16 bit in the android manifest.

<android>

    <colorDepth>16bit</colorDepth>

    <manifestAdditions>...</manifestAdditions>

</android>

Its huge, I just remembered this because I accidentally deleted and auto generated a new xml today. (defaults to 32 bit color depth).

In my gpu render mode app it makes the difference of maxing out at 35-40 fps (32bit) to a solid 60 fps (16 bit) and to be honest it doesn't really look that much different on the xoom anyway.

Just wanted to throw that in there...

I have also noticed on my android phone, 32bit color depth causes some touch event lag, I mean, I don't think it causes it directly, but just the added performance hit against also trying to max the framerate makes touch lag. At 16 bit its nice.

Participating Frequently
February 7, 2012

Ok, here comes the really 'funny' stuff

I created swf file that  plays back 640x360 video (fla FPS is set to 30). Everything is smooth and razor sharp.

in the same file I remove video code and add a sprite with circle drawn in it. It's as simple as it gets -  I touch the screen and drag the sprite

Multutouch is set to : Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

And now performance drops to 4 -6 frames per second. I can drag this sprite, but i makes 4-6 position updates per seconds.

I set stage quality to "low" - no change

To make things even funnier I re-enbled background video and  scaled it twice - now I can drag my sprite over playing video, and.... video plays perfectly but sprite moves like my framerate was 4fps!

as a cherry on top:

this all happens only when I play back swf file. When I create apk file and install it on my tablet - then it behaves properly and runs smoothly.

And now I'm completely confused

Inspiring
February 7, 2012

My Air game was not performong as well on my xoom as it was my phone. (gpu mode rendering) mostly bitmaps but some vectors and text, I set stage.quality to low in the app and its a huge difference. xoom can now easily double the framerate of my phone.

that helped me, i cant immagine why banner ads are slow, although I havent really noticed on mine.

Mines a xoom family edition i got on sale, slightly larger/thinner but same chip i think.

Colin Holgate
Inspiring
February 7, 2012

One thing to watch out for, having quality as "low" may improve the performance, but the vectors will look a little chunky.

iBr3nt
Inspiring
February 5, 2012

Hi,

Make sure you set the multitouch input mode in order to get the gesture

events recognized:

Multitouch.inputMode = MultitouchInputMode.GESTURE;

iBrent

Participating Frequently
February 5, 2012

I forgot to mention - multitouch input mode is set as You wrote.

Funny thing -  right now I'm playing with accelerometer and it works fine ( although performance is still unacceptable )

Participating Frequently
February 5, 2012

I've downloaded examples connected to this post and the elephant one don't work.
I started to think that there's something wrong with my tablet -  so I downloaded multitouch tester from android store  - and it's everything OK with my device