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 03 Nov 2011
    Embed
/**
 * Copyright yuugurenote ( http://wonderfl.net/user/yuugurenote )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/vNFn
 */

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 AS111103_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(sw,sh,false,0x000000);
        public var viewBmp:Bitmap=new Bitmap(viewBmd);
        public var _mySprite:mySprite;

        public function AS111103_01() {

            addChild(viewBmp);
            var tmpBmd:BitmapData;
            myColor.redMultiplier=0;
            myColor.greenMultiplier=0.1;
            myColor.blueMultiplier=0.9999;
            addEventListener(Event.ENTER_FRAME,xDraw);
            stage.addEventListener(Event.ENTER_FRAME,xEnter);
        }
        public function xDraw(e:Event):void {
            viewBmd.draw(stage,null,myColor);
        }
        public function xEnter(e:Event):void {
            _mySprite = new mySprite();
            _mySprite.x=sw/2;
            _mySprite.y=sh/2;
            addChild(_mySprite);
        }
    }
}

import flash.display.Sprite;
import flash.geom.ColorTransform;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.filters.BlurFilter;

class mySprite extends Sprite {

    public var r:Number;
    public var speed:Number=5;
    //    public var myColor2:ColorTransform = new ColorTransform();

    public function mySprite() {

        this.graphics.beginFill(0x0000FF,1);
        this.graphics.drawCircle(0,0,0.7);
        this.graphics.endFill();

//                myColor2.color=Math.random()*0xffffff;
//                this.transform.colorTransform=myColor2;

        this.addEventListener(Event.ENTER_FRAME,xEnter2);

    }

    public function xEnter2(e:Event):void {
        r=Math.atan2(stage.mouseY-this.y,stage.mouseX-this.x)*180/Math.PI;
        this.x += speed*Math.cos(r/180*Math.PI);
        this.y += speed*Math.sin(r/180*Math.PI);


    }
}