![]() |
|
||||||||||
|
|||||
|
Регистрация: Jun 2005
Адрес: Санкт-Петербург
Сообщений: 159
|
господа, есть ли какой-нить трэйсер для флэша, чтобы можно было трэйсить приложения из браузера?
|
|
|||||
|
Регистрация: Nov 2003
Сообщений: 256
|
а по-русски можно? насколько я знаю трейсят обычно растры.
__________________
Программирование на Flash подобно шаманству, гаданию на кофейной гуще - никогда не знаешь, что получится. Anime Must Die! |
|
|||||
|
смотри в блоге нирта была такая фишка
|
|
|||||
|
.grin! wuz here
|
class com.kidskilla.Debug{
private static var __oa:Array;
public function Debug(){
return;
}
public static function getWholeObj(obj):String{
if(typeof obj != "object") return obj.toString();
Debug.__oa = new Array();
Object.prototype._toString = function () {
if(typeof this == "function") return ""
Debug.__oa[Debug.__oa.length] = this;
var s = ""+typeof this+": {\n";
var ti = ""
for (var i in this) {
var c = (typeof this[i] == "object");
var type = c ? "" : " ("+typeof this[i]+")";
if(c){
var w
for(var j in Debug.__oa){
if(this[i] == Debug.__oa[j]){
w = true
ti = "(parent Object: "+j+" from top)"
};
}
if(!w) ti = this[i]._toString().split("\n").join("\n\t");
} else {
ti = this[i];
}
s += "\t["+i+"] = "+ti+type+" "+"\n";
}
s += "};";
return s;
}
Array.prototype._toString = Object.prototype._toString
_global.ASSetPropFlags(Array.prototype, "_toString", 1);
_global.ASSetPropFlags(Object.prototype, "_toString", 1);
var txt = obj._toString();
delete Array.prototype._toString;
delete Object.prototype._toString;
return txt;
}
public static function watch(obj:Object, prop:String, browser:Boolean):Void{
obj.watch(prop, function(prop, wuz, now, obj){
var func = browser ? Debug.browser : trace;
trace("\n"+prop+":\n\twas="+wuz+";\n\tnow="+now+";\n");
});
}
public static function trace(mess):Void{
trace(getWholeObj(mess))
}
public static function browser(mess):Void{
mess = Debug.getWholeObj(mess)
mess = mess.split("\n").join("\n<br>").split("\t").join("\t ").split(";[").join("<b>").split("] =").join("</b> =");;
var t = "javascript:w=window.open('', 'trace', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=1, Copyhistory=0, Width=200, Height=200');";
t+="w.document.writeln(\"<html><head><title>Flash trace</title></head><body bgcolor='#FFFFFF' color='#000000'>"+mess+"<br></body></html>\");";
getURL(t);
}
public static function toString():String{
return "[Debug v1.0]";
}
}
com.kidskilla.Debug.browser(my_obj); com.kidskilla.Debug.browser(myValue)
__________________
Breakcore them all! |
|
|||||
|
Регистрация: Jun 2005
Адрес: Санкт-Петербург
Сообщений: 159
|
спасибо!
__________________
F.U.C.K.I.N.P.U.N.K. |
![]() |
![]() |
Часовой пояс GMT +4, время: 07:35. |
|
|
« Предыдущая тема | Следующая тема » |
|
|