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

Testing this new fangled wonderfl

I'm avoiding doing my Analysis assignment, so I tried online flash development, and sort of wrote the first thing that came into my head as I tested stuff... resulting in what looks like electron orbits ( thought in fact they are  just moving in the space defined by some random spheroids, rather than around in orbits. They can hit the nucleus!)
Get Adobe Flash player
by josefndean 07 Nov 2012
    Embed
/**
 * Copyright josefndean ( http://wonderfl.net/user/josefndean )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/6eOX
 */

// forked from josefndean's flash on 2012-11-7
package {
    import flash.events.Event;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public var circle:Sprite = new Sprite();
        public var circle2:Sprite = new Sprite();
        public var circle3:Sprite = new Sprite();
        public var nucleus:Sprite = new Sprite()
        public var time:int =0;
        public function FlashTest() {
            circle.graphics.beginFill(0x445566,1);
            circle.graphics.lineStyle(1);
            circle.graphics.drawCircle(0,0,2);
            circle.graphics.endFill();
            stage.addChild(circle);
            circle2.graphics.beginFill(0x445566,1);
            circle2.graphics.lineStyle(1);
            circle2.graphics.drawCircle(0,0,2);
            circle2.graphics.endFill();
            stage.addChild(circle2);
            circle3.graphics.beginFill(0x445566,1);
            circle3.graphics.lineStyle(1);
            circle3.graphics.drawCircle(0,0,2);
            circle3.graphics.endFill();
            stage.addChild(circle3);
            nucleus.graphics.lineStyle(1);
            nucleus.graphics.beginFill(0x445566,1);
            nucleus.graphics.drawCircle(-1,-2,3);
            nucleus.graphics.drawCircle(1,1,3);
            nucleus.graphics.beginFill(0x00ee44,0.9);
            nucleus.graphics.drawCircle(1,-2,2);
            nucleus.graphics.drawCircle(-2,1,3);
            stage.addChild(nucleus);
            nucleus.x = 180;
            nucleus.y = 180;
            stage.addEventListener(Event.ENTER_FRAME,mouseDown);
        }
        public function mouseDown(e:Event):void{
            var shadow:Sprite = newCircle();
            shadow.x = circle.x;
            shadow.y = circle.y;
            shadow.addEventListener(Event.EXIT_FRAME,fadeShadow);
            shadow = newCircle();
            shadow.x = circle2.x;
            shadow.y = circle2.y;
            shadow.addEventListener(Event.EXIT_FRAME,fadeShadow);
            shadow = newCircle();
            shadow.x = circle3.x;
            shadow.y = circle3.y;
            shadow.addEventListener(Event.EXIT_FRAME,fadeShadow);
            ++time
            circle.y = 180+(100*Math.sin(2.6*time/stage.frameRate));
           circle.x = 180+(100*Math.cos(2*time/stage.frameRate));
           circle.scaleY = 1+Math.cos(2*time/stage.frameRate);
           circle.scaleX = 1+Math.cos(2*time/stage.frameRate);
           circle2.y = 180+(80*Math.sin(2.1*time/stage.frameRate));
           circle2.x = 180+(102*Math.cos(2.7*time/stage.frameRate));
           circle2.scaleY = 1+Math.cos(1.5*time/stage.frameRate);
           circle2.scaleX = 1+Math.cos(1.5*time/stage.frameRate);
           circle3.y = 180+(90*Math.sin(1.8*time/stage.frameRate));
           circle3.x = 180+(109*Math.cos(2.1*time/stage.frameRate));
           circle3.scaleY = 1+Math.cos(2.6*time/stage.frameRate);
           circle3.scaleX = 1+Math.cos(2.6*time/stage.frameRate);
        }
        public function newCircle():Sprite{
            var circle:Sprite = new Sprite();
            circle.graphics.lineStyle(1);
            circle.graphics.drawCircle(0,0,1);
            stage.addChild(circle);
            return circle;
        }
        public function fadeShadow(e:Event):void{
            var shadow:Sprite = Sprite(e.target);
            shadow.alpha-=0.1;
            if (shadow.alpha <0) {
                shadow.removeEventListener(Event.ENTER_FRAME,fadeShadow);
                stage.removeChild(shadow);
                shadow = null;
            }

            

        }


    }
}