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

青いゆらゆらライン

マウスを動かすと青いラインがゆらゆら動きます。
Get Adobe Flash player
by yuugurenote 15 Jun 2012
    Embed
/**
 * Copyright yuugurenote ( http://wonderfl.net/user/yuugurenote )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/rBzu
 */

package {
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.display.Graphics;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.geom.ColorTransform;
    [SWF(width=465,height=465,backgroundColor=0xFFFFFF,frameRate=60)]

    public class AS120615_01 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(sh,sw,false,0x000000);
        public var viewBmp:Bitmap=new Bitmap(viewBmd);
        public var _myRect:myRect;
        public var _myArray:Array = new Array();

        public function AS120615_01() {
            addChild(viewBmp);
            var tmpBmd:BitmapData;
            myColor.redMultiplier=0.99;
            myColor.greenMultiplier=0.99;
            myColor.blueMultiplier=0.99;
            addEventListener(Event.ENTER_FRAME,xDraw);
            stage.addEventListener(MouseEvent.MOUSE_MOVE,xDown);
        }
        public function xDraw(e:Event):void {
            viewBmd.draw(stage,null,myColor);
        }
        public function xDown(e:MouseEvent):void {
                _myRect = new myRect();
                _myRect.x=mouseX;
                _myRect.y=mouseY;
                addChild(_myRect);
        }
    }
}

import flash.display.Sprite;
import flash.filters.BlurFilter;
    import flash.events.Event;

class myRect extends Sprite {
    public var deg:Number=0;
    public var radius:Number=13;
    public var myFil:BlurFilter=new BlurFilter(4,4,2);
    public function myRect() {
        this.graphics.beginFill(0x0000FF,1);
        this.graphics.drawRect(0,0,radius,radius);
        this.graphics.endFill();
        this.filters=[myFil];
        this.addEventListener(Event.ENTER_FRAME,xEnter2);
    }
    public function xEnter2(e:Event):void {
        deg = (deg+3)%360;
        this.y+=1.5;
        this.x=this.x-5*Math.cos(deg*Math.PI/180);
        if (this.y>stage.stageHeight) {
            this.removeEventListener(Event.ENTER_FRAME,xEnter2);
            this.graphics.clear();
        }
    }
}