Link to home
Start Free TrialLog in
Avatar of Hulfy
Hulfy

asked on

tiling effect in flash

Hi,

I am trying to get a row by row tiling mask effect, so the image builds up. The problem is the code I have written only adds the from left to right (columns) rather than rows.

I think I am getting close. Can anyone help?
import caurina.transitions.*;
 
var squareHolder:MovieClip = new MovieClip();
addChild(squareHolder);
cameraImg.mask = squareHolder;
 
for(var i:uint=0; i<10; i++) {
	for(var j:uint=0; j<15; j++) {
 
 
	
var square:Sprite = new Sprite();
 
square.graphics.beginFill(0x0000FF);
square.graphics.drawRect(0,0,100,100);
square.graphics.endFill();
 
 
 
square.x = square.x + i*50;
square.y = square.y + j*50 ;
square.scaleX = 0;
square.scaleY = 0;
 
squareHolder.addChild(square);
 
 Tweener.addTween(square, {scaleX:1, time:5, transition:"easeOutBack", delay: i/20 });
 Tweener.addTween(square, {scaleY:1, time:5, transition:"easeOutBack", delay: i/20 });
 
}
 
 
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial