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

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 AS110820_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 var px:Number=0;
        public var py:Number;

        public function AS110820_01() {

            addChild(viewBmp);
            var tmpBmd:BitmapData;
            myColor.redMultiplier=0.999;
            myColor.greenMultiplier=0.999;
            myColor.blueMultiplier=0.999;
            addEventListener(Event.ENTER_FRAME,xDraw);
            stage.addEventListener(MouseEvent.MOUSE_DOWN,xDown);
        }
        public function xDraw(e:Event):void {
            viewBmd.draw(stage,null,myColor);
        }
        public function xDown(e:MouseEvent):void {
            _mySprite = new mySprite();
            _mySprite.x = px;
            py = mouseY;
            _mySprite.y = py;
            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 deg:Number=0;
    public var myColor2:ColorTransform = new ColorTransform();
    public var myFil:BlurFilter=new BlurFilter(4,4,2);

    public function mySprite() {
        
        this.graphics.beginFill(0xFFFFFF,1);
        this.graphics.drawCircle(0,0,6);
        this.graphics.endFill();

        myColor2.color=Math.random()*0xffffff;
        this.transform.colorTransform=myColor2;
        this.filters=[myFil];
        this.addEventListener(Event.ENTER_FRAME,xEnter);
    }

    public function xEnter(e:Event):void {
        deg = (deg+10)%360;
        this.y=this.y-5*Math.sin(deg*Math.PI/180);
        this.x+=3;

        if (this.x>stage.stageWidth) {
            this.removeEventListener(Event.ENTER_FRAME,xEnter);
            this.graphics.clear();
        }
    }

}