PageRenderTime 52ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/DebugTextField.hx

http://github.com/gwillen/test
Haxe | 33 lines | 27 code | 6 blank | 0 comment | 0 complexity | 710c7eb0fe0f084cab12d1e36bd30b5d MD5 | raw file
Possible License(s): GPL-3.0
  1. import flash.display.MovieClip;
  2. import flash.display.Sprite;
  3. import flash.text.TextField;
  4. import flash.display.Graphics;
  5. import flash.Lib;
  6. import flash.display.Loader;
  7. import flash.net.URLRequest;
  8. import flash.display.Sprite;
  9. import flash.display.Bitmap;
  10. class DebugTextField extends TextField{
  11. public function new() {
  12. super();
  13. width = 600;
  14. height = 600;
  15. alpha = 0.5;
  16. background = true;
  17. backgroundColor = 0xFFFFFF;
  18. visible = false;
  19. }
  20. public function trace(s : String) {
  21. appendText(s);
  22. while( numLines > 45){
  23. var t = text.substr(getLineLength(0));
  24. text = t;
  25. }
  26. }
  27. }