1, open Flash CS3, create an AS3 file, and save it in the folder .. \touchlib\as3\int, named MTTest.fla
2. Create a new as3 file named MTTest.as and save it in the .. \touchlib\as3\int folder.
3. In the as3 file, enter the following code. I suggest you type it yourself, not copy it directly.
4. Enter MTTest in the MTTest.fla document class, and pay attention to case.
5. Open Flosc.rar, click the "Start" button, and then open Simulator.jar
6. Answer the interface of Flash CS3, Ctrl+Enter, and publish Flash. At this time, you should see a green square.
7. Back to the simulator interface, you can zoom and move the green square. Pay attention to the corresponding position, or you won't get to the square.
Public class MTTest extended Sprite
{
private var MC:rotablescalable = new rotablescalable();
Common function MTTest():void
{
TUIO.init(this," localhost ",3000,'',true);
init();
}
Private function init():void
{
MC . graphics . begin fill(0x 99 cc 00);
mc.graphics.drawRect(-50,-50, 100, 100);
MC . graphics . end fill();
addChild(MC);
mc.x = 200
mc.y = 200
}
}
}