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: 20111114:some circle

一番左の高さで整列する動きを追加してみました。
Get Adobe Flash player
by yuugurenote 14 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/6AVP
 */

package {
    import flash.display.MovieClip;
    import flash.events.Event;
    [SWF(width=465,height=465,backgroundColor=0x000000,frameRate=60)]

    public class Main extends MovieClip {
        public var _mySprite:mySprite;
        public var _mySpriteAr:Array = new Array();

        public var basic_size_rate:int;
        public var point_size:int;
        public var point_x:int;
        public var point_y:int;
        public var point_total:int;
        public var point_d:int;
        public var point_trans_x:int;

        public function Main() {
            this.graphics.beginFill(0x000000,1);
            this.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
            this.graphics.endFill();

            basic_size_rate=0;
            point_y=300;
            point_total=23;
            point_d=20;
            point_trans_x=10;

            for (var i:int = 0; i<point_total; i++) {
                _mySprite = new mySprite();
                addChild(_mySprite);
                _mySpriteAr.push(_mySprite);
            }
            for (var j:int = 0; j<point_total; j++) {
                point_x=j*point_d+point_trans_x;
                _mySpriteAr[j].x=point_x;
                _mySpriteAr[j].y=point_y;
                addChild(_mySpriteAr[j]);
            }

            addEventListener(Event.ENTER_FRAME,xEnter);
        }
        public function xEnter(e:Event):void {
            for (var i:int = 0; i<point_total; i++) {
                if (i==0) {
                    _mySpriteAr[i].y += (stage.mouseY - _mySpriteAr[i].y)/8;
                } else {
                    _mySpriteAr[i].y += (_mySpriteAr[i - 1].y - _mySpriteAr[i].y)/8;
                }
            }
        }
    }
}


import flash.display.Sprite;
class mySprite extends Sprite {
    public var basic_size:int;
    public function mySprite() {
        basic_size=5;
        this.graphics.lineStyle(0,0xFF0000 , 1);
        this.graphics.drawCircle(0 , 0 , 5);
    }
}