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

GREEN

Get Adobe Flash player
by christian 14 Nov 2012
/**
 * Copyright christian ( http://wonderfl.net/user/christian )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/f0dd
 */

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

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

    [ SWF (width = '465', height = '465', backgroundColor = '0x000000', frameRate = '25')]

    public class GREEN extends Sprite
    {
        private var r : Rectangle = new Rectangle (0, 0, 465, 465), p : Point = new Point (0, 0);
        private var s : BitmapData, e : BitmapData = new BitmapData (465, 465, true, 0);
        private var c : ColorTransform = new ColorTransform (1, 0.99999, 1, 1);
        private var b : BlurFilter = new BlurFilter (1.5, 1.5, 5);
        private var o : Array = [new Point (), new Point ()];
        private var n : uint = Math.random () * 0xFFFF;
        private var t : Number;

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

            graphics.beginFill (0, 1);
            graphics.drawRect  (0, 0, 465, 465);

            addChild (new Bitmap (s = e.clone ()));

            stage.addEventListener ('enterFrame', function () : void
            {
                t = getTimer ();

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

                e.perlinNoise (200, 200, 2, n, true, true, 2, false, o);

                e.threshold (e, r, p, '!=', 0xFF008000, 0);
                e.applyFilter (e, r, p, b);

                e.draw (e, null, null, 'add');

                s.colorTransform (r, c);
                s.copyPixels (e, r, p, null, null, true);
            });
        }
    }
}