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: addChild...addChild...addChild...(ry

/**
 * Copyright milchreis ( http://wonderfl.net/user/milchreis )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/gZEt
 */

// forked from Seiya.Kai's addChild...addChild...addChild...(ry
package
{    
    import flash.display.Sprite;
        
    [SWF(width="800", height="600", frameRate="60")]    
    public class Main08 extends Sprite
    {
        public function Main08()
        {    
            setCircle();    
        }
        
        private function setCircle():void
        {
            var c:Circle30 = new Circle30(0xFF0000);
            addChild(c);
            
            c.x = 50;
            c.y = 150;
            
            for (var i:uint = 0; i < 4; ++i)
            {
                var current:Circle30 = new Circle30(0xFF0000);
                current.x = 100;
                c.addChild(current);
                c = current;
            }
           
        }
    }
}


import flash.display.*;
import flash.events.Event;

class Circle30 extends Sprite
{
    private var t:Number = 0;
    public function Circle30(color:uint):void{
        graphics.beginFill(color,1.0);
        graphics.drawCircle(50,0,50);
        graphics.endFill();
        addEventListener(Event.ENTER_FRAME,onEnterFrame);
    }
    
    private function onEnterFrame(e:Event):void
    {
        t+=0.1;
        this.rotation = Math.sin(t)*30;
    }
}