forked from: forked from: Wonderfl trace()
forked from forked from: Wonderfl trace() (diff: 1)
ActionScript3 source code
/**
* Copyright pleclech ( http://wonderfl.net/user/pleclech )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/ouHV
*/
// forked from pleclech's forked from: Wonderfl trace()
// forked from Yukulele's Wonderfl trace()
package {
import flash.display.Sprite;
import flash.utils.describeType;
public class FlashTest extends Sprite {
public static var i:int=0;
public function FlashTest() {
if (i==0) {
i++;
initTrace(stage);
}
trace(describeType(Wonderfl));
trace([10,{a:5,b:10},"abc"]);
if (i==1)
{
try {
new FlashTest()
} catch (e:*){}
}
}
}
}
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;
};
