Flash MX 2004. Dropped in Flash Professional CS6.
document.saveAndCompact([bOkToSaveAs])
bOkToSaveAs An optional parameter that, if true or omitted and the file was never saved, opens the Save As dialog box. If false and the file was never saved, the file is not saved. The default value is true.
A Boolean value: true if the save-and-compact operation completes successfully; false otherwise.
Dropped in Flash Professional CS6.
The following example saves and compacts the current document:
fl.getDocumentDOM().saveAndCompact();document.save(), fl.saveDocumentAs(), fl.saveDocument(), fl.saveAll().