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

experiment

Get Adobe Flash player
by tjoen 03 Jan 2012

    Talk

    IPFix at 04 Jan 2012 16:52
    add movement / interaction ! =D
    Embed
/**
 * Copyright tjoen ( http://wonderfl.net/user/tjoen )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/7L1z
 */

package
{
    import flash.display.Sprite;
            
    public class Experiment extends Sprite
    {

        public var mc:Sprite;
        
        public function Experiment():void
        {
            
            mc = new Sprite();
            addChild(mc);
            
            var i:Number = 0;
            var angle:Number = 0;
            mc.graphics.lineStyle(0.1, 0xbbbbbb, 1, false, "normal", null, null, 233);
            mc.graphics.beginFill(0xFFDD00, 1);
            
            for (i; i < 10000; i++)
            {
                
                angle += 1.3998; //2.3998
                var cr:Sprite = new Sprite();
                cr.x = Math.cos(angle) * i * 1;
                cr.y = Math.sin(angle) * i * 1;
                mc.addChild(cr);
                if (i % 3 == 0)
                {
                    mc.graphics.lineTo(cr.x, cr.y);
                }
            }
            mc.graphics.endFill();
        
        }
    }
}