# Tile transition effect using masks and the caurina library

**URL:** <https://forum.kirupa.com/t/tile-transition-effect-using-masks-and-the-caurina-library/330804>\
**Category:** flash\
**Created:** [March 19, 2013, 12:50am UTC](https://forum.kirupa.com/t/tile-transition-effect-using-masks-and-the-caurina-library/330804 "2013-03-19T00:50:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gannet](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@gannet](https://forum.kirupa.com/u/gannet)\
**Post date:** [March 19, 2013, 12:50am UTC](https://forum.kirupa.com/t/tile-transition-effect-using-masks-and-the-caurina-library/330804/1 "2013-03-19T00:50:47Z")

</div>

Hi,

I’m trying to create a tile transition effect by adding masks to the stage and animating them using the caurina library. I can add the tiles to the stage using a for loop but when i try to animate them, nothing is happening.

Here’s my code:  
import caurina.transitions.Tweener;

var numCols = Stage.width / 60;  
var numRows = Stage.height / 60;  
var numTiles = numCols \* numRows;

for (var i = 0; i \< numTiles; i ++) {  
var newTile:MovieClip = this.attachMovie(“box”, “box”, this.getNextHighestDepth());

```
var currentCol = i % numCols;
var currentRow = int(i / numCols);

newTile._xscale = newTile._yscale = 0;
newTile._alpha = 0;
    newTile._x = (newTile._width / 2) + (newTile._width * currentCol);
    newTile._y = (newTile._height / 2) + (newTile._height * currentRow);

Tweener.addTween(newTile, {delay:currentCol + currentRow) * .05, time:0.5, _xscale:100, _yscale:100, _alpha:100, transition:"easeOutExpo"});

```

}

Anyone know what i’m doing wrong?
