문제

My program is a mmorpg game using flash. Now I found button hit testing cost a lot of time. I think there is no DisplayObject to remove to speed up. I don't know how to optimize it..

도움이 되었습니까?

해결책

It seems a backward-compatible technique that can't be simply shut off.

Apparently, button hit testing is completely bypassed when using touch events instead of mouse events. Of course, this is not applicable if you want to target in-browser PC users..

If you're building the game for mobile devices, use touch events, like this:

Multitouch.mapTouchToMouse = false;
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; 
addEventListener(TouchEvent.TOUCH_BEGIN, onActualStageTouch);

A useful discussion on the Adobe forum is here: http://forums.adobe.com/message/5346701#5346701

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top