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

とらいあんぐーるぐる1

三角形が回転します。
Get Adobe Flash player
by yuugurenote 24 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/wGi5
 */

package {
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.events.Event;

    [SWF(width=465,height=465,backgroundColor=0x000000,frameRate=60)]
    public class AS120624_01 extends Sprite {
        public var sw:Number=stage.stageWidth;
        public var sh:Number=stage.stageHeight;
        public var max:Number=9;
        public var min:Number=1;
        public var min2:Number=0.09;
        public var speedX:Number=Math.random()*0.3+0.3;
        public var speedY:Number=Math.random()*0.3+0.2;
        public var radius:Number;

        public var _mySprite:mySprite;
        public var _myArray:Array = new Array();
        public var _r:Number=15;
        public var _Point:Number;

        public function AS120624_01() {
            var myBack:Sprite = new Sprite();
            myBack.graphics.beginFill(0x000000,1);
            myBack.graphics.drawRect(0,0,sw,sh);
            myBack.graphics.endFill();
            myBack.x = myBack.y = 0;
            addChild(myBack);
            

            for (var i:Number=0; i<max; i++) {
                var _Blank:Sprite = new Sprite();
                _Blank.x=sw/2;
                _Blank.y=sh/2;
                addChild(_Blank);

                _mySprite=new mySprite(_r-(i*min));
                _mySprite.y=- _r;
                _Blank.addChild(_mySprite);
                _myArray.push(_Blank);
                _myArray[i].addEventListener(Event.ENTER_FRAME,xEnter);
            }
            radius=_mySprite.width/2;
        }
        public function xEnter(e:Event):void {
            for (var i:Number =0; i<max; i++) {
                if (i==0) {
                    _myArray[i].rotation+=1;
                    _myArray[i].x+=speedX;
                    _myArray[i].y+=speedY;
                    if (_myArray[i].x+radius>sw) {
                        _myArray[i].x=sh-radius;
                        speedX=- speedX;
                    }
                    if (_myArray[i].x-radius<0) {
                        _myArray[i].x=radius;
                        speedX=- speedX;
                    }
                    if (_myArray[i].y+radius>sh) {
                        _myArray[i].y=sh-radius;
                        speedY=- speedY;
                    }
                    if (_myArray[i].y-radius<0) {
                        _myArray[i].y=radius;
                        speedY=- speedY;
                    }
                } else {
                    _myArray[i].x += (_myArray[i-1].x - _myArray[i].x)/80;
                    _myArray[i].y += (_myArray[i-1].y - _myArray[i].y)/80;
                    _myArray[i].rotation += 1-(i*min2);
                }
            }
        }
    }
}

import flash.display.Sprite;
import flash.events.Event;
import flash.filters.BlurFilter;
class mySprite extends Sprite {
    public var _r:Number;
    public var myFil:BlurFilter=new BlurFilter(4,4,2);
    public function mySprite(r:Number) {
        _r=r;
        this.graphics.lineStyle(3,0x00FFFF,1,false,"none");
        this.graphics.moveTo(0,0);
        this.graphics.lineTo(_r,_r*1.6);
        this.graphics.lineTo(-_r,_r*1.6);
        this.graphics.lineTo(0,0);
        this.filters=[myFil];
    }
}