jpg: var imageFileURL = imgsFileUrl + flaNum+"_1.jpg"; select_lockedAndHideLayers(nowPartFlaDoc, false); nowPartFlaDoc.selectAll(); fl.getDocumentDOM().convertSelectionToBitmap(); var bitMap=fl.getDocumentDOM().selection[0]; var sqIndex = fl.getDocumentDOM().library.findItemIndex(bitMap.libraryItem.name); var libItem = fl.getDocumentDOM().library.items[sqIndex]; libItem.exportToFile(imageFileURL, 100);
png: var fileURI = placeFile+nowPartName.split(".fla")[0] + ".png"; nowPartFlaDoc.exportPNG(fileURI, false, true);