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

A-B

/**
 * Copyright christian ( http://wonderfl.net/user/christian )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/tJJ8
 */

package
{
    import flash.geom.*;
    import flash.events.*;
    import flash.display.*;
    import flash.utils.getTimer;

    import frocessing.color.ColorHSV;

    /**  @author SPANVEGA // CHRISTIAN  **/

    [ SWF (width = '465', height = '465', backgroundColor = '0xFFFFFF', frameRate = '30')]

    public class A_B extends Sprite
    {
        private var e : BitmapData = new BitmapData (233, 233, true, 0);
        private var s : BitmapData = new BitmapData (465, 465, true, 0);
        private var m : Matrix = new Matrix (2, 0, 0, 2, 0, 0);
        private var o : Array = [new Point (), new Point ()];
        private var c : ColorHSV = new ColorHSV ();
        private var a : Array = map ();
        private var t : Number;

        public function A_B ()
        {
            Wonderfl.disable_capture ();
            stage.scaleMode = 'noScale';

            addChild (new Bitmap (s));

            stage.addEventListener (Event.ENTER_FRAME, function () : void
            {
                t = getTimer ();

                o[1].x =- (o[0].x = Math.cos (t * 0.00005) * 1000);
                o[1].y =- (o[0].y = Math.sin (t * 0.00005) * 1000);

                e.perlinNoise (100, 100, 2, 0xAAA, false, false, 8, false, o);
                e.paletteMap (e, e.rect, e.rect.topLeft, null, null, null, a);

                s.draw (e, m, null, null, null, true);
            });
        }

        private function map () : Array
        {
            a = [];

            for (var i : int = 0x00; i < 0xFF; i++) { a.push (c.value32); c.h += 0x05; }

            return a;
        }
    }
}