if (swf != null)
{
swf.setTopLevelClass(getSymbolClass());
final ISWFWriter writer = new SWFWriter(swf, Header.Compression.NONE);
final String outputFileNameWithExt = outputBaseName + ".swf";
final File outputFile = new File(outputDirectoryName + outputFileNameWithExt);
try
{
CountingOutputStream output = new CountingOutputStream(
new BufferedOutputStream(new FileOutputStream(outputFile)));
writer.writeTo(output);
output.flush();
output.close();
writer.close();
out.format("%s, %d bytes written in %5.3f seconds\n",
outputFile.toString(),
output.getByteCount(),
(System.nanoTime() - startTime) / 1e9 );