Wonderfl trace()
/**
* Copyright Yukulele ( http://wonderfl.net/user/Yukulele )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/vrly
*/
package {
import flash.display.Sprite;
import flash.utils.describeType;
public class FlashTest extends Sprite {
public function FlashTest() {
initTrace(stage);
trace(describeType(Wonderfl));
trace([10,{a:5,b:10},"abc"]);
}
}
}
import flash.display.Stage;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
var txt:TextField=new TextField();
txt.defaultTextFormat=new flash.text.TextFormat("courier new,courier,arial",11);
txt.mouseEnabled=false;
txt.selectable=false;
txt.alpha=.5;
var initTrace:Function=function(s:Stage):void{s.addChild(txt);};
txt.autoSize = TextFieldAutoSize.LEFT;
function trace(mess:*):void
{
var s:Stage=txt.stage;
txt.appendText(mess.toString()+"\n");
if(s===null)
return;
txt.y=s.stageHeight-txt.textHeight;
};