質問

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