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

M4F10R

bit of fun with XOR
Get Adobe Flash player
by FLASHMAFIA 06 Oct 2015
/**
 * Copyright FLASHMAFIA ( http://wonderfl.net/user/FLASHMAFIA )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/hvtM
 */

package
{
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Sprite;
    import flash.events.Event;

    public class M4F10R extends Sprite
    {
        private var bmd : BitmapData;
        private var fcnt : int;


        function M4F10R()
        {
            stage.scaleMode = 'noScale';
            stage.align = 'TL';
            stage.frameRate = 64;
            
            var bm : Bitmap = new Bitmap(bmd = new BitmapData(512, 512, false, 0x0));
            bm.x = bm.y = -23;
            addChild(bm);
            
            addEventListener('enterFrame', oef);
        }

        public function oef(e : Event) : void
        {
            fcnt++;
            
            bmd.lock();
            
            var n : int = 512 * 512 - (fcnt & 1) - 512;
            
            while (n-- > 512)
            {
                bmd.setPixel((n & 511), (n >> 9), (((n & 511) + (fcnt << ((fcnt >> 8) & 3)) | (n >> 9) + (fcnt << ((fcnt >> 9) & 3))) * fcnt >> ((fcnt >> 3) & 1023)));
            }
            
            bmd.unlock();
        }
    }
}