Hi guys,
Probably making a really silly mistake here, but I can’t see it. This code generates a bunch of circles, sticks them to a MovieClip then uses that clip as a mask. All that works, but now I want to animate these circles. Nothing happens - the whole thing just stops when I use the tween class. Any ideas?
var theMask:MovieClip = new MovieClip();
function addLotsOfShapes():void {
for (var i:int = 1; i < 200; i++) {
addShapes();
}
addChild(theMask);
pagesLayout.mask = theMask;
}
function addShapes():void {
// DRAW THE CIRCLE
var circleMaskShape:MovieClip = new MovieClip();
circleMaskShape.graphics.lineStyle();
circleMaskShape.graphics.beginFill(0xff000000);
circleMaskShape.graphics.drawCircle(_cmX,_cmY,10);
circleMaskShape.graphics.endFill();
circleMaskShape.x = Math.random() * 1800;
circleMaskShape.y = Math.random() * 1270;
var circleMaskShapeX = new Tween( circleMaskShape, "scaleX", Strong.easeIn, circleMaskShape.scaleX, 15, 3, true );
var circleMaskShapeY = new Tween( circleMaskShape, "scaleY", Strong.easeIn, circleMaskShape.scaleY, 15, 3, true );
theMask.addChild(circleMaskShape);
}