Extract resources from SWF using open source jpexs jar library
NodeJS
v6.*Java
v8.*
npm install jpexs-flash-decompiler --save
Works only export export tool
Example:
const jpexs = require( 'jpexs-flash-decompiler' );
jpexs.export( {
file: 'path/to/swf/file',
output: 'path/to/output/dir',
items: [ jpexs.ITEM.FONT, ... ],
formats: [ jpexs.FORMAT.FONT.WOFF, ... ],
silence: false // optional. if set to `true`, there's no console log.
}, function( err ) {
if ( err ) {
console.log( 'Error: ', err.message );
} else {
console.log( 'DONE!' );
}
} );
jpexs.ITEM.SCRIPT
Scripts (Default format: ActionScript source)jpexs.ITEM.IMAGE
Images (Default format: PNG/JPEG)jpexs.ITEM.SHAPE
Shapes (Default format: SVG)jpexs.ITEM.MORPHSHAPE
MorphShapes (Default format: SVG)jpexs.ITEM.MOVIE
Movies (Default format: FLV without sound)jpexs.ITEM.FONT
Fonts (Default format: TTF)jpexs.ITEM.FRAME
Frames (Default format: PNG)jpexs.ITEM.SPRITE
Sprites (Default format: PNG)jpexs.ITEM.BUTTON
Buttons (Default format: PNG)jpexs.ITEM.SOUND
Sounds (Default format: MP3/WAV/FLV only sound)jpexs.ITEM.BINARY
Binary data (Default format: Raw data)jpexs.ITEM.TEXT
Texts (Default format: Plain text)jpexs.ITEM.FLA
Everything to FLA compressed formatjpexs.ITEM.ALL
Every resource (but not FLA)
- script
jpexs.FORMAT.SCRIPT.AS
ActionScript sourcejpexs.FORMAT.SCRIPT.HEX
ActionScript Hex onlyjpexs.FORMAT.SCRIPT.PCODE
ActionScript P-codejpexs.FORMAT.SCRIPT.PCODEHEX
ActionScript P-code with hex
- shape
jpexs.FORMAT.SHAPE.SVG
SVG format for Shapesjpexs.FORMAT.SHAPE.BMP
BMP format for Shapesjpexs.FORMAT.SHAPE.PNG
PNG format for Shapesjpexs.FORMAT.SHAPE.CANVAS
HTML5 Canvas format for Shapes
- morph shape
jpexs.FORMAT.MORPHSHAPE.SVG
SVG format for MorphShapesjpexs.FORMAT.MORPHSHAPE.CANVAS
HTML5 Canvas format for MorphShapes
- frame
jpexs.FORMAT.FRAME.BMP
BMP format for Framesjpexs.FORMAT.FRAME.PNG
PNG format for Framesjpexs.FORMAT.FRAME.GIF
GIF format for Framesjpexs.FORMAT.FRAME.PDF
PDF format for Framesjpexs.FORMAT.FRAME.AVI
AVI format for Framesjpexs.FORMAT.FRAME.SVG
SVG format for Framesjpexs.FORMAT.FRAME.CANVAS
HTML5 Canvas format for Frames
- sprite
jpexs.FORMAT.SPRITE.PNG
PNG format for Spritesjpexs.FORMAT.SPRITE.GIF
GIF format for Spritesjpexs.FORMAT.SPRITE.AVI
AVI format for Spritesjpexs.FORMAT.SPRITE.SVG
SVG format for Spritesjpexs.FORMAT.SPRITE.PDF
PDF format for Spritesjpexs.FORMAT.SPRITE.BMP
BMP format for Spritesjpexs.FORMAT.SPRITE.CANVAS
HTML5 Canvas format for Sprites
- button
jpexs.FORMAT.BUTTON.PNG
PNG format for Buttonsjpexs.FORMAT.BUTTON.SVG
SVG format for Buttonsjpexs.FORMAT.BUTTON.BMP
BMP format for Buttons
- image
jpexs.FORMAT.IMAGE.BMP
BMP format for Imagesjpexs.FORMAT.IMAGE.PNG
PNG format for Imagesjpexs.FORMAT.IMAGE.JPEG
JPEG format for Imagesjpexs.FORMAT.IMAGE.ALL
PNG/GIF/JPEG format for Images
- text
jpexs.FORMAT.TEXT.SVG
SVG format for Textsjpexs.FORMAT.TEXT.PLAIN
Plain text format for Textsjpexs.FORMAT.TEXT.FORMATTED
Formatted text format for Texts
- font
jpexs.FORMAT.FONT.TTF
TTF format for Fontsjpexs.FORMAT.FONT.WOFF
WOFF format for Fonts
- sound
jpexs.FORMAT.SOUND.FLV
FLV format for Soundsjpexs.FORMAT.SOUND.WAV
WAV format for Soundsjpexs.FORMAT.SOUND.ALL
MP3/WAV/FLV format for Sounds