MouseEvents or TouchEvents, any difference in execution speed?
I'm building an air app which will run on iPads. For the touch interaction I'm using just MouseEvents handlers (MOUSE_DOWN, MOUSE_MOVE, MOUSE_OUT, MOUSE_UP) because my app don't need multitouch开发者_开发百科, now I'm wondering if there is any difference in execution speed, should I use the equivalent touch events or the mouse events are faster?
MouseEvent
s will be faster and easier since you don't have to write extra logic to ignore secondary touches.
For performance, the most important thing to do is set mouseEnabled = false
and mouseChildren = false
wherever you can. Otherwise Flash will be checking every DisplayObject
for mouse events, and dragging your finger across the screen will cause a drop in frame rate.
There should be no performance difference.
精彩评论