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

addChild...addChild...addChild...(ry

Get Adobe Flash player
by Seiya.Kai 24 Aug 2012
/**
 * Copyright Seiya.Kai ( http://wonderfl.net/user/Seiya.Kai )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/6p5E
 */

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 c1:Circle30 = new Circle30(0xFF0000);
            c1.x = 50;
            c1.y = 150;
            addChild(c1);

            var c2:Circle30 = new Circle30(0xFF0000);
            c2.x = 100;
            c2.y = 0;
            c1.addChild(c2);
            
            var c3:Circle30 = new Circle30(0xFF0000);
            c3.x = 100;
            c3.y = 0;
            c2.addChild(c3);
            
            var c4:Circle30 = new Circle30(0xFF0000);
            c4.x = 100;
            c4.y = 0;
            c3.addChild(c4);
            
            var c5:Circle30 = new Circle30(0xFF0000);
            c5.x = 100;
            c5.y = 0;
            c4.addChild(c5);
        }
    }
}


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;
    }
}