Flash 10.1 Multitouch in OSX
Hey, I want to play with the new multitouch functionality of Flash 10.1 as is demonstrated here: http://blog.martinlegris.com/2009/12/13/tutorial-multi-touch-in-as3-flash-player-101-part-1/#more-186
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
_tf = new TextField();
_tf.width = stage.stageWidth;
_tf.height = stage.stageHei开发者_运维技巧ght;
_tf.mouseEnabled = false;
addChild(_tf);
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
_tf.text = "Input Mode: " + Multitouch.inputMode + "\n";
_tf.appendText("Touch Points: " + Multitouch.maxTouchPoints + "\n");
_tf.appendText("Supports Touch Events: " + Multitouch.supportsTouchEvents + "\n");
But when I do it with my new MacBookPro running osx 10.6.1, I get:
InputMode: none;
Touch Points: 0;
Supports Touch Events: false;
Now, I know that it is supported on the MacBooks, because this guy posted a video of it: http://theflashblog.com/?p=1666
Is there something I need to do different to make that first bit of code to work properly on OSX? A driver to install or something? Can anyone who has got this up and running let me know what I'm doing wrong?
EDIT: Currently on Mac, Multitouch only works inside the AIR runtime, and in addition, the low level touch events are not available. GestureEvents are available, so now my problem is more complicated: I can do Multitouch.supportsGestureEvents which returns true... and I can list out which gesture events I can listen to, ROTATE, PAN, etc. but nothing happens. I can't get any of the events to trigger.
only gestures work on the mac. Check out this post http://www.adobe.com/devnet/flash/articles/multitouch_gestures.html
精彩评论