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: forked from: forked from: boon

Get Adobe Flash player
by signedvoid 05 Feb 2011
    Embed
/**
 * Copyright signedvoid ( http://wonderfl.net/user/signedvoid )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/sKih
 */

// forked from bradsedito's forked from: forked from: boon
// forked from hacker_ciaxk5up's forked from: boon
// forked from ketatony's boon
package
{
    import flash.display.Sprite;
    import flash.display.BitmapData;
    import flash.display.Bitmap;
    import flash.text.*;
    import flash.events.Event;
    import flash.filters.BlurFilter;
    import flash.geom.*;
    
    [SWF(width="465", height="465", frameRatee="60", backgroundColor="0x0")]
    
    public class Boon extends Sprite
    {
        private var txt:TextField;
        private var canvas:BitmapData;
        private var base:Sprite;
    
        public function Boon()
        {
            txt = new TextField();
            var fmt:TextFormat = new TextFormat("Arial", 60);
            fmt.color = 0x2f1f1f;
            fmt.bold = true;
            txt.defaultTextFormat = fmt;
            txt.text = "FFFUUU";
            txt.autoSize = TextFieldAutoSize.LEFT;
            
            base = new Sprite();
            base.addChild( txt );
            
            canvas = new BitmapData( 465, 465, true, 0x1f000000);
            addChild( new Bitmap( canvas ));
            
            stage.addEventListener( Event.ENTER_FRAME, enterFrameHandler );
        }
        
        private function enterFrameHandler( evt:Event ):void
        {
            canvas.lock();
            canvas.applyFilter( canvas, canvas.rect, new Point(), new BlurFilter(2,2,3));
            canvas.colorTransform( canvas.rect, new ColorTransform(1,1,1,1,-2,-1,-1,0));
            canvas.draw( base, null, null, "add" );
            txt.x +=  ((stage.mouseX-txt.width/2) - txt.x)/10;
            txt.y +=  ((stage.mouseY-txt.height/2) - txt.y)/10;
            canvas.unlock();
        }
    }
}