In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

String Blur

Get Adobe Flash player
by Kay 16 Mar 2009
package {
	import flash.display.Sprite;
	import flash.display.BitmapData;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFieldAutoSize;
	import flash.filters.BevelFilter;
	import flash.filters.BlurFilter;
	import flash.events.Event;
	import flash.geom.Point;
	[SWF(backgroundColor=0x000000, width=400, height=400, frameRate=40)]
	public class Take01 extends Sprite {
		private const SW:Number = stage.stageWidth;
		private const SH:Number = stage.stageHeight;
		private var bitmapData:BitmapData;
		private var tField:TextField;
		private var wrapper:Sprite;
		private var fBevel:BevelFilter;
		private var fBlur:BlurFilter;
		private var point:Point = new Point(0,0);
		public function Take01():void {
			fBevel = new BevelFilter();
			fBevel.shadowColor = 0x000066;
			fBevel.highlightColor = 0x6666ff;
			fBlur = new BlurFilter();
			fBlur.blurX = 4;
			fBlur.blurY = 4;
			wrapper = new Sprite();
			wrapper.x = stage.stageWidth/2;
			wrapper.y = stage.stageHeight/2;
			addChild(wrapper);
			var tFormat:TextFormat = new TextFormat();
			tFormat.size = 60;
			tFormat.font = "Arial Black";
			tFormat.color = 0x0000cc;
			tField = new TextField();
			tField.defaultTextFormat = tFormat;
			tField.selectable = false;
			tField.autoSize = TextFieldAutoSize.LEFT;
			tField.text = "wonderfl";
			tField.x = -tField.width/2;
			tField.y = -tField.height/2;
			wrapper.addChild(tField);
			wrapper.addEventListener(Event.ENTER_FRAME, rotate);
			bitmapData = new BitmapData(SW,SH,true,0x000000);
			graphics.beginBitmapFill(bitmapData);
			graphics.drawRect(0,0,SW,SH);
			graphics.endFill();
		}
		private function rotate(e:Event):void {
			e.target.rotationZ+=2;
			fBevel.angle = -e.target.rotationZ+45;
			tField.filters = [fBevel];
			bitmapData.draw(stage);
			bitmapData.applyFilter(bitmapData,bitmapData.rect,point,fBlur);
		}
	}
}