导出时出现的 jsfl 跟踪错误
jsfl trace errors that appeared while exporting
我用这个jsfl函数导出fla文件,改了一些codes.it导出fla文件,然后把结果写入results.txt。有时候fla有错误无法导出,我只有无法导出的信息。 我想要 results.txt 中的错误消息
我使用了 fl.trace(fl.compilerErrors);
但不包含出现在输出面板上的错误消息。
非常感谢你们。
exportFla('file:///C|/Users/Server/Desktop/gedex/bilisselbecerilermodulu/17/24/5');
function exportFla(uri)
{
var fileMask= "*.fla";
var dc = FLfile.listFolder(uri+ "/" + fileMask);
fl.trace(uri);
for(var i=0;i<=dc.length-1;i++)
{
var dosyaisim=dc[i];
fl.openDocument(uri+"/"+dc[i]);
if(fl.getDocumentDOM().exportSWF(uri+"/"+dosyaisim))
{
FLfile.write("file:///C|/Users/Server/Desktop/results.txt",uri+" / "+dosyaisim+" Successful export \n","append");
fl.trace(dosyaisim+" : export edildi");
}
else
{
FLfile.write("file:///C|/Users/Server/Desktop/results.txt",uri+" / "+dosyaisim+" Errror Accured \n","append");
fl.trace(uri+dosyaisim+" export edilemedi");
// ı want improve this code to give more information about error
fl.trace(fl.compilerErrors);
}
fl.closeDocument(dc[i]);
}
}
要完成此任务,您可以保存输出和编译器错误面板中的状态:
fl.outputPanel.save( "file:///C|/Users/Server/Desktop/results.txt", "append");
fl.compilerErrors.save( "file:///C|/Users/Server/Desktop/results.txt", "append");
我用这个jsfl函数导出fla文件,改了一些codes.it导出fla文件,然后把结果写入results.txt。有时候fla有错误无法导出,我只有无法导出的信息。 我想要 results.txt 中的错误消息 我使用了 fl.trace(fl.compilerErrors); 但不包含出现在输出面板上的错误消息。
非常感谢你们。
exportFla('file:///C|/Users/Server/Desktop/gedex/bilisselbecerilermodulu/17/24/5');
function exportFla(uri)
{
var fileMask= "*.fla";
var dc = FLfile.listFolder(uri+ "/" + fileMask);
fl.trace(uri);
for(var i=0;i<=dc.length-1;i++)
{
var dosyaisim=dc[i];
fl.openDocument(uri+"/"+dc[i]);
if(fl.getDocumentDOM().exportSWF(uri+"/"+dosyaisim))
{
FLfile.write("file:///C|/Users/Server/Desktop/results.txt",uri+" / "+dosyaisim+" Successful export \n","append");
fl.trace(dosyaisim+" : export edildi");
}
else
{
FLfile.write("file:///C|/Users/Server/Desktop/results.txt",uri+" / "+dosyaisim+" Errror Accured \n","append");
fl.trace(uri+dosyaisim+" export edilemedi");
// ı want improve this code to give more information about error
fl.trace(fl.compilerErrors);
}
fl.closeDocument(dc[i]);
}
}
要完成此任务,您可以保存输出和编译器错误面板中的状态:
fl.outputPanel.save( "file:///C|/Users/Server/Desktop/results.txt", "append");
fl.compilerErrors.save( "file:///C|/Users/Server/Desktop/results.txt", "append");