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

forked from: Blur Circle

なぜかクリックしないと描画されない>< 
-> 別のマシンだと動いた

@author ll_koba_ll (RAWHIDE.)
// forked from ll_koba_ll's Blur Circle
// write as3 code here..

package
{    
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.filters.*;

    // なぜかクリックしないと描画されない>< 
    // -> 別のマシンだと動いた

    [SWF(frameRate="24", backgroundColor="#000000")]

     /** 
      *  
      * @author ll_koba_ll (RAWHIDE.)
      */  
    public class Rotationlight extends Sprite
    {
        private var blur:BlurFilter;
        private var container:Sprite;
        private var source:Sprite;
        private var bmpd:BitmapData;

        public function Rotationlight()
        {

            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            stage.quality = StageQuality.LOW;            
            init();            
            addEventListener(Event.ENTER_FRAME, update);
        }

        private function init():void
        {
            trace(stage.stageWidth)
            blur = new BlurFilter(3,3);            
            bmpd = new BitmapData(500, 500, true, 0x00FFFFFF);
            container = new Sprite();
            source = new Sprite();

            addChild(new Bitmap(bmpd));
            container.addChild(source);

            
            
        }

        private function update(e:Event = null):void
        {
            addCircle();
            addCircle();
            addCircle();
            addCircle();
            addCircle();
           

            
            bmpd.draw(container, null, null, BlendMode.ADD);
            bmpd.applyFilter(bmpd, bmpd.rect, new Point(), blur);
            source.x = mouseX;
            source.y = mouseY;
        }
        private function addCircle(){
        		with(source.graphics)
            {
            		clear();
                beginFill(0x00bbff);
                drawCircle(Math.random()*40-20,Math.random()*40-20,Math.random()*10);
                endFill();
            }
        	}
         
    }
}