forked from: Hello World!!!
// forked from nitoyon's Hello World!!!
package{
import flash.display.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import caurina.transitions.Tweener;
public class Foo extends Sprite{
private var bd:BitmapData;
public function Foo():void{
var tf:TextField = new TextField();
tf.textColor = 0x000000;
tf.text = "Hello World!!!\nHello World!!!\nHello World!!!";
tf.autoSize = "left";
bd = new BitmapData(tf.width, tf.height, false, 0xDAC86);
bd.draw(tf);
bd.applyFilter(bd, bd.rect, new Point(), new BlurFilter());
bd.draw(tf);
for(var i:int = 0; i < bd.width; i++){
for(var j:int = 0; j < bd.height; j++){
var circle:DisplayObject = addChild(new Circle(bd.getPixel(i, j)));
circle.x = i * 8;
circle.y = j * 8;
circle.alpha = 0;
Tweener.addTween(
circle,
{
alpha: 1,//Math.random() + 0.7,
delay:Math.random() * (i + j)*.2,
time: Math.random() * (i + j)
}
);
}
}
}
private function randomize(d:DisplayObject):DisplayObject{
d.x = 40 * Math.random();
d.y = 300 * Math.random();
d.alpha = 0;
return d;
}
}
}
import flash.display.Sprite;
class Circle extends Sprite{
public function Circle(color:uint):void{
graphics.beginFill(color);
graphics.drawRect(0, 0, 6,6);
graphics.endFill();
}
}