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: earth

Sprite 遅いのどうしたらいいんだろ
Get Adobe Flash player
by bobjoker 09 Feb 2010
    Embed
// forked from asannou's earth
// forked from hacker_cztbzu4g's circles
// Sprite 遅いのどうしたらいいんだろ
package {
    import flash.display.*;
    import flash.events.*;

    [SWF(width=465, height=465, frameRate=24, backgroundColor=0x0000FF)]  
    public class circle extends Sprite {
        public function circle() {
            addEventListener(
                Event.ENTER_FRAME,
                function (e :Event) :void {
                    var g :Graphics = graphics;
                    draw(g, Math.random() < 0.5 ? 0x00FF00 : 0x0000BB);
                }
            );
        }
        private function draw(g :Graphics, color :int) :void {
            g.beginFill(color, 0.1);
            g.drawCircle(
                -50 + Math.random() * 300,
                -50 + Math.random() * 300,
                Math.random() * 150
            );
            g.endFill();
        }
    }
}