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

flash on 2012-1-22

Get Adobe Flash player
by Susisu 22 Jan 2012
package {
    import flash.events.Event;
    import flash.display.Sprite;
    [SWF(frameRate="60")]
    public class FlashTest extends Sprite {
        private const w:Number=465;
        private const h:Number=465;
        private const s:Number=50;
        private var a:Number;
        public function FlashTest() {
            a=0;
            graphics.lineStyle(0,0x000000);
            graphics.moveTo(0,0);
            addEventListener(Event.ENTER_FRAME,onEnterFrame);
        }
        private function onEnterFrame(e:Event):void{
            if(a>Math.PI*2){
                removeEventListener(Event.ENTER_FRAME,onEnterFrame);
            }
            var t:Number=r(a);
            if(a==0){
                graphics.moveTo(w/2+t*Math.cos(a)*s,h/2+t*Math.sin(a)*s);
            }
            else{
                graphics.lineTo(w/2+t*Math.cos(a)*s,h/2+t*Math.sin(a)*s);
            }
            a+=Math.PI/180;
        }
        private function r(a:Number):Number{
            var t:Number=1;
            for(var i:int=1;i<1000;i++){
                t+=Math.cos(i*i*a)/i/i;
            }
            return t;
        }

    }
}