using the tuio classes in specific the touchEvent Class you can do the same
first you import all dependencies
import flash.system.fscommand;
import flash.events.TouchEvent;
import flash.events.*;
Then you can use the following function for the button click and touch handlers:
button.addEventListener(MouseEvent.CLICK, clickHandler);
button.addEventListener(TouchEvent.MOUSE_DOWN, touchHandler);
private function clickHandler(e:Event):void {
fscommand("quit");
}
private function touchHandler (e:Event):void{
fscommand("quit");
}
this way your button will react to both mouse clicks and touch events
or if you wanted to you could use a touchlib wrapper its in the elements folder…
then it would be as simple as
WrapperObject.addEventListener(MouseEvent.CLICK, clickHandler);
this pretty much does the same thing…
Taha