i added
import com.touchlib.*;
and declared the variables
private var parentScaleCanvas:RotatableScalable;
private var childMoveCanvas:MovieClip;
and it worked but now i can´t put images in the stage and make them work, i don´t know why…
here is my code so maybe you can help me
package
{
/**
* ...
* @author DefaultUser (Tools -> Custom Arguments...)
*/
import flash.events.*;
import app.core.action.RotatableScalable;
import flash.display.*;
import com.touchlib.*;
public class rotar_escalar extends Sprite
{
private var parentScaleCanvas:RotatableScalable;
private var childMoveCanvas:MovieClip;
private var childMoveCanvas1:MovieClip;
public function rotar_escalar()
{
//Setups up Stage
//Creates a Canvas that rotates and Scales
//parentScaleCanvas never moves/rotates, but scales
//childMoveCanvas never scales, but moves and rotates.
//childMoveCanvas is like the old subobj
parentScaleCanvas = new RotatableScalable();
parentScaleCanvas.graphics.beginFill(0x101010,1.0);
parentScaleCanvas.graphics.drawRect(0,0,300,300);
parentScaleCanvas.graphics.endFill();
childMoveCanvas = new MovieClip();
parentScaleCanvas.x = 0;
parentScaleCanvas.y = 0;
this.addChild(parentScaleCanvas);
parentScaleCanvas.addChild(childMoveCanvas);
parentScaleCanvas = new RotatableScalable();
parentScaleCanvas.graphics.beginFill(0xffffff3300,1.0);
parentScaleCanvas.graphics.drawRect(50,50,300,300);
parentScaleCanvas.graphics.endFill();
childMoveCanvas1 = new MovieClip();
parentScaleCanvas.x = 0;
parentScaleCanvas.y = 0;
this.addChild(parentScaleCanvas);
parentScaleCanvas.addChild(childMoveCanvas1);
parentScaleCanvas = new RotatableScalable();
var s4 = new Sum();
s4.x = Math.random()*200+100;
s4.y = Math.random()*200+100;
s4.scaleX = Math.random();
s4.scaleY = s4.scaleX;
s4.rotation = Math.random()*100;
parentScaleCanvas.addChild(s4);
parentScaleCanvas = new RotatableScalable();
var ho = new home1();
ho.x = Math.random()*200+100;
ho.y = Math.random()*200+100;
ho.scaleX = Math.random();
ho.scaleY = ho.scaleX;
ho.rotation = Math.random()*100;
parentScaleCanvas.addChild(ho);
//Sets up communication with TUIO
TUIO.init( this, 'localhost', 3000, '', true );
}
}
}