?
Solved

tiling effect in flash

Posted on 2008-11-12
2
Medium Priority
?
254 Views
Last Modified: 2013-11-11
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

0
Comment
Question by:Hulfy
1 Comment
 
LVL 34

Accepted Solution

by:
Aneesh Chopra earned 2000 total points
ID: 22937798
here is the fixed code:
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);
		var delayNum = (i+j)/20;
		Tweener.addTween(square, {scaleX:1, time:5, transition:"easeOutBack", delay:delayNum });
		Tweener.addTween(square, {scaleY:1, time:5, transition:"easeOutBack", delay:delayNum });
 
	}
}

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question