//这段代码用来显示每个触点下面的小红圈 package app
MyTouchApp{ //adds a circle where you touch (no resize) import flash
display
*; import flash
events
*; import flash
*; import flash
*; public class MyTouchApp extends Sprite { public function MyTouchApp() { //--------connect to TUIO----------------- TUIO
init(this,'localhost',3000,'',true); trace("MyTouchApp Initialized"); //---------------------------------------- addEventListener(TouchEvent
MOUSE_DOWN, touchDown); //run touchdown, when touched } public function touchDown(e:TouchEvent):void{ var curPt:Point = parent
globalToLocal(new Point(e
stageX, e
stageY)); //convert touch points to x,y var circle:Sprite = new Sprite(); //create a new sprite circle
graphics
lineStyle(10, 0xff0000); //set line width to 10px and red circ