Hi, I’m trying to trace a message and testing some TouchEvent in Device Central with device Flash 10.1 Multitouch. I got TOUCH_BEGIN to work but I can’t get TOUCH_MOVE trace message to appear even though I’ve pressed Alt and move the mouse at the same time on the display sprite. So what am I doing wrong?
package
{
import flash.display.MovieClip;
import flash.events.TouchEvent;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
import flash.display.Sprite;
import flash.display.Shape;
public class ExpTouch extends MovieClip
{
public function ExpTouch()
{
var display:Sprite = new Sprite();
var back:Shape = new Shape();
back.graphics.beginFill(0x000000, 1);
back.graphics.lineStyle(2, 0xFFFFFF, 1);
back.graphics.drawRect(0,0,stage.stageWidth - 20,stage.stageHeight - 100);
back.graphics.endFill();
display.addChild(back);
display.x = 10;
display.y = 10;
addChild(display);
if(Multitouch.supportsTouchEvents)
{
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
display.addEventListener(TouchEvent.TOUCH_BEGIN, touchBegin);
display.addEventListener(TouchEvent.TOUCH_END, touchEnd);
display.addEventListener(TouchEvent.TOUCH_MOVE, touchMove);
display.addEventListener(TouchEvent.TOUCH_OVER, touchOver);
display.addEventListener(TouchEvent.TOUCH_TAP, touchTap);
}
}
private function touchBegin(e:TouchEvent):void
{
trace("touch begins");
}
private function touchEnd(e:TouchEvent):void
{
trace("touch ends");
}
private function touchMove(e:TouchEvent):void
{
trace("touch move");
}
private function touchOver(e:TouchEvent):void
{
trace("touch over");
}
private function touchTap(e:TouchEvent):void
{
trace("touch tap");
}
}
}
I also tried to run this SWF on the Blackberry Playbook test device and Device Central pops up a message saying Touch Point is not supported. How can this be possible if Blackberry Playbook has a touch screen?
Thanks for the help.