/**
* Copyright yuugurenote ( http://wonderfl.net/user/yuugurenote )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/v5QJ
*/
package {
import flash.display.Sprite;
import flash.display.Graphics;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.geom.ColorTransform;
[SWF(width=465,height=465,backgroundColor=0x000000,frameRate=60)]
public class AS111121_02 extends Sprite {
public var sw:Number=stage.stageWidth;
public var sh:Number=stage.stageHeight;
public var myColor:ColorTransform = new ColorTransform();
public var viewBmd:BitmapData=new BitmapData(sw,sh,false,0x000000);
public var viewBmp:Bitmap=new Bitmap(viewBmd);
public var _mySprite:mySprite;
public var myInt:uint = 0;
public function AS111121_02() {
addChild(viewBmp);
var tmpBmd:BitmapData;
myColor.redMultiplier=0;
myColor.greenMultiplier=0.7;
myColor.blueMultiplier=0.9;
addEventListener(Event.ENTER_FRAME,xDraw);
stage.addEventListener(MouseEvent.MOUSE_MOVE,xEnter1);
}
public function xDraw(e:Event):void {
viewBmd.draw(stage,null,myColor);
}
public function xEnter1(e:Event):void {
//myInt++;
_mySprite = new mySprite();
_mySprite.x=mouseX;
_mySprite.y=sh/2;
addChild(_mySprite);
}
}
}
import flash.display.Sprite;
import flash.events.Event;
import flash.filters.BlurFilter;
class mySprite extends Sprite {
public var myFlag:Boolean=Math.random()<0.5;
public var speedY:Number=Math.random()*3+1;
public var myFil:BlurFilter=new BlurFilter(4,4,2);
public function mySprite() {
this.graphics.beginFill(0x0098FF,1);
this.graphics.drawCircle(0,0,4);
this.graphics.endFill();
this.filters=[myFil];
this.addEventListener(Event.ENTER_FRAME,xEnter2);
}
public function xEnter2(e:Event):void {
this.y+=speedY * (myFlag ? 1 : -1);
this.alpha -= 0.01;
if (this.alpha < 0) {
this.graphics.clear();
}
}
}