0

I use this jsfl function to export fla files after changing some codes.it exports fla files and writes the results into results.txt .Sometimes a fla has an error it cant be exported and ı have only informaiton that it couldnt be exported. I want have the error message in results.txt ı used fl.trace(fl.compilerErrors); but dosnt contain error message that appears on the output panel.

thank you guys alot.

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]);
  }
}
Metin Ilhan
  • 120
  • 10

1 Answers1

0

To accomplish this task you can save the status from output and compilererrors panel:

fl.outputPanel.save( "file:///C|/Users/Server/Desktop/results.txt", "append");
fl.compilerErrors.save( "file:///C|/Users/Server/Desktop/results.txt", "append");
Azzy Elvul
  • 1,403
  • 1
  • 12
  • 22