Flash CS6 Professional.
bitmapItem.hasValidAlphaLayer
Read-only property; a boolean indicating if a bitmap in the library has a valid/useful alpha channel. This flag will help you decide if you should export the bitmap item as a PNG instead of a JPEG using the bitmapItem.exportToFile() function.
The following code exports a library item with the proper file name extension depending on whether it has a valid alpha layer.
var bitmapItem = fl.getDocumentDOM().library.items[0];
var uri = fl.browseForFileURI("open");
if (bitmapItem.hasValidAlphaLayer) uri += ".png";
else uri += ".jpg";
bitmapItem.exportToFile(uri);bitmapItem.sourceFileExists, bitmapItem.sourceFileIsCurrent, bitmapItem.sourceFilePath, FLfile.getModificationDate()