flash on 2009-8-3
/**
* Copyright awef ( http://wonderfl.net/user/awef )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/1BhE
*/
package
{
import flash.display.Sprite;
import caurina.transitions.Tweener;
[SWF (frameRate = "60")]
public class main extends Sprite
{
public function main()
{
var width:int = 20;
var height:int = 20;
var sp:Sprite;
for (var ix:int = 0; ix < width; ix++)
{
for (var iy:int = 0; iy < height; iy++)
{
sp = new Sprite();
sp.x = Math.random() * stage.stageWidth;
sp.y = -Math.random() * stage.stageHeight;
sp.graphics.beginFill(Math.random() * 0xFFFFFF);
sp.graphics.drawRect(0, 0, stage.stageWidth / width, stage.stageHeight / height);
sp.graphics.endFill();
Tweener.addTween(sp, {
x : ix / width * stage.stageWidth,
y : iy / height * stage.stageHeight,
time : 3 * (ix * iy) / (width * height),
transition : "easeOutBack"
});
addChild(sp);
}
}
}
}
}