describeType on a method

by rfkrocktk forked from Simple Console (diff: 6)
♥0 | Line 24 | Modified 2010-11-01 10:02:21 | MIT License
play

ActionScript3 source code

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

// forked from rfkrocktk's Simple Console
package {
    import flash.events.Event;
    import flash.utils.describeType;
    import flash.text.TextFormat;
    import flash.text.TextField;
    import flash.display.Sprite;    
    
    public class FlashTest extends Sprite {
        
        private var textfield:TextField;
        
        public function FlashTest() {
            this.textfield = new TextField();
            this.textfield.x = this.textfield.y = 10;
            this.textfield.width = this.stage.stageWidth;
            this.textfield.height = this.stage.stageHeight;
            this.textfield.defaultTextFormat = new TextFormat("Courier New");
            
            this.addChild(this.textfield);
            
            output("describeType on a method:");
            output("--------------------------------------");
            output(describeType(function (value:String, e:Event, n:Number, ...org):void {}).toXMLString());
        }
        
        public function output(message:String):void {
            this.textfield.appendText(message + "\n");
        }
    }
}