Reputation: 631
I am trying to make a game on mobile with adobe air. Everything went smoothly 'till I encounter problems with mouse click event. I experience very slow response on button/movie clip when adding mouse click event listener to mimic tap/touch event on mobile. The delay time after player's finger tap the button/movie clip till the execution is 1-2 seconds (really annoying really). So I wonder I should change to touch_tap event instead of mouse click event and hope things change for good. Unfortunately it doesn't really show any difference. I played a lot of games on android (and I think they are made by flash) and I can not understand why their tap event and response time is unbelievably fast (almost instant after the my touch/tap on the button/movieclip). Anyone could help me shed light on this?
Upvotes: 1
Views: 2041
Reputation: 560
Make sure you disable doubleClick. Sometimes this is the reason for a delayed response... guess doubleClick-time for touchinputs is even longer than on desktop...
Upvotes: 2
Reputation: 1118
I don't think handling TouchEvent make THAT much difference since Flex framework currently deals with MouseEvents and there's basically no such delay.
What it reminds me though is a rare bug I met in some previous versions of FlashPlayer and (desktop) AIR where mouse and keyboard events were delayed up to several minutes(!) on some specific hardware at some specific views (I mean some set of objects on the screen). The important moment here is to say that current framerate was high and constant(!), so it's not a general performance issue. Event though Adobe says it was fixed, I'm not really sure as they didn't show any certainty about it. So try to check if framerate is OK, if it is — nasty runtime bug... and you should try to play around with display list, blend modes, cache-as-bitmaps (if presents).
Upvotes: 2