简体   繁体   中英

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.stageHeight;
_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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM