Skip to content
Nov 29 / Peter deHaan

Saving the contents of the Flash Output panel to an external file using JSFL

The following example shows how you can use JSFL to save the contents of the Flash Output panel to an external file using the fl.outputPanel.save() command.

Full code after the jump.

// JSFL
var OUTPUT_FILE = "file:///c:/outputPanel.txt";
 
var arr = ["PAGEFAULTCOUNT",
           "PEAKWORKINGSETSIZE",
           "WORKINGSETSIZE",
           "QUOTAPEAKPAGEDPOOLUSAGE",
           "QUOTAPAGEDPOOLUSAGE",
           "QUOTAPEAKNONPAGEDPOOLUSAGE",
           "QUOTANONPAGEDPOOLUSAGE",
           "PAGEFILEUSAGE",
           "PEAKPAGEFILEUSAGE"];
 
fl.outputPanel.clear();
for (var i = 0; i < arr.length; i++) {
    fl.trace(i + ") " + arr[i] + ": " + fl.getAppMemoryInfo(i));
}
fl.outputPanel.save(OUTPUT_FILE, false);

Running this JSFL command displays the following information in the Output panel, as well as saving it to the specified file:

0) PAGEFAULTCOUNT: 489076
1) PEAKWORKINGSETSIZE: 177864704
2) WORKINGSETSIZE: 27672576
3) QUOTAPEAKPAGEDPOOLUSAGE: 487204
4) QUOTAPAGEDPOOLUSAGE: 438692
5) QUOTAPEAKNONPAGEDPOOLUSAGE: 32432
6) QUOTANONPAGEDPOOLUSAGE: 30160
7) PAGEFILEUSAGE: 146759680
8) PEAKPAGEFILEUSAGE: 152084480

Leave a Comment