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

flash on 2010-2-6

Get Adobe Flash player
by 9re 09 Feb 2010
    Embed
/**
 * Copyright 9re ( http://wonderfl.net/user/9re )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/9Euv
 */

package {
	import flash.events.FocusEvent;
	import flash.events.Event;
	import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
    		private static var _trace:Function = trace;
    		private var _tf:TextField;
    	
        public function FlashTest() {
            // write as3 code here..
            _tf = new TextField;
            addEventListener(Event.DEACTIVATE, traceEvent);
            addEventListener(Event.ACTIVATE, traceEvent);
            stage.addEventListener(Event.MOUSE_LEAVE, traceEvent);
            //addEventListener(Event.FRAME_CONSTRUCTED, traceEvent);
            
            _tf.width = 100;
            _tf.height = 100;
            _tf.wordWrap = true;
            addChild(_tf);
        }
        
        private function traceEvent(e:Event):void {
        		trace(e.type);
        }
        
        private function trace(...o:Array):void {
        		_tf.appendText(o + '\n');
        		_tf.scrollV = _tf.maxScrollV;
        		_trace(o);
        }
    }
}