// // Blobs (1,300bytes effect) // by Mr.doob // stage.align = "TL"; stage.scaleMode = "noScale"; var bl :Array = new Array(); var c:Sprite = new Sprite(); c.filters = [new BlurFilter(30,30,1)]; addChild(c); var r :Bitmap = new Bitmap( new BitmapData( stage.stageWidth, stage.stageHeight, false, 0x00FFFFFF ) ); addChild(r); for (var i:Number = 0; i < 100; i ++) { bl[i] = new MovieClip(); bl[i].graphics.beginGradientFill("radial",[0x000000,0xF7004A],[0xFF,0xFF],[0x00,0x80]); bl[i].graphics.drawCircle(0,0,Math.random()*50+25); bl[i].x = Math.random() * stage.stageWidth; bl[i].y = Math.random() * stage.stageHeight; bl[i].cycle = Math.random() * 100000; c.addChild(bl[i]); } addEventListener( "enterFrame", u ); function u(e) { for (var i:Number = 0; i < 100; i ++) { bl[i].x += Math.sin( ( getTimer() + bl[i].cycle ) * .001 ) * 2; bl[i].y += Math.cos( ( getTimer() + bl[i].cycle ) * .001 ) * 2; bl[i].scaleX = bl[i].scaleY += Math.sin( ( getTimer() + bl[i].cycle ) *.001 ) *.015 ; } r.bitmapData.fillRect(new Rectangle(0,0,stage.stageWidth, stage.stageHeight),0x00FFFFFF); r.bitmapData.draw(c); r.bitmapData.threshold(r.bitmapData,new Rectangle(0,0,stage.stageWidth, stage.stageHeight),new Point(0,0),">",0x00800000,0xFFFFFFFF,0x00808080,true); }