forked from: Hello World!!!
package{
import flash.display.*;
import flash.text.*;
import flash.filters.*;
import flash.geom.*;
import caurina.transitions.Tweener;
[SWF(backgroundColor="0x000000")]
public class HelloWorld extends Sprite{
private var bd:BitmapData;
private var baseColor:uint = 0xFFFFFF;
public function HelloWorld():void{
var tf:TextField = new TextField();
tf.textColor = 0x000000;
tf.htmlText = "<font face='Times New Roman' size='18'>Hello\nWorld</font>";
tf.autoSize = "left";
bd = new BitmapData(tf.width, tf.height, false, baseColor);
bd.draw(tf);
for(var i:int = 0; i < tf.textWidth; i++){
for(var j:int = 0; j < tf.textHeight; j++){
if (bd.getPixel(i, j) == baseColor)
continue;
Tweener.addTween(
randomize(addChild(new Circle(Math.random() * 0xFFFFFF))),
{
x: i * 10,
y: j * 10,
alpha: 1,
delay: (i + j) * .2 * Math.random(),
time: 1,
transition: "easeOutCirc"
}
);
}
}
}
private function randomize(d:DisplayObject):DisplayObject{
d.x = 500 * Math.random();
d.y = 500 * Math.random();
d.alpha = 0;
return d;
}
}
}
import flash.display.*;
import flash.filters.*;
import flash.text.*;
class Circle extends Shape{
public function Circle(color:uint):void{
graphics.beginFill(color);
graphics.drawCircle(0, 0, 6);
graphics.endFill();
blendMode=BlendMode.ADD;
filters=[new BlurFilter(3, 3, 1)];
}
}