If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.
![List of issues](/flash/images/issue_list.png)
#2064 Improve Exporting and Importing of SVG files
Author:
MeowOfDoom
![user user](/flash/images/user.png)
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: SVG
State: new ![Help](/flash/images/help.png)
![Help](/flash/images/help.png)
> What steps will reproduce the problem?
Export a unit sprite to an SVG, in this case I'm using the Colony Flash Game.
> What is the expected output? What do you see instead?
Instead, we see that it exports with the layering wrong and messed up. Even upon fixing
it, the sprite is not 1:1 the same as what we see in JPEX.
Upon trying to re-import the SVG into JPEX, it is blank. This does not go for other
formats like PNG or BMP.
> What version of the product are you using? Is it "nightly build"? Which operating system
do you have?
Windows 10 operating system. Latest nightly build and tested on latest stable build.
> Please provide any additional information below. If the problem is related to a SWF
file, attach it here, otherwise we can't help you.
1. Open JPEX
2. Open the .SWF attached.
3. Click on 'Sprites'
4. Scroll down until you see the games units, look for 'DefineShape4(450)'
5. Right click -> Export Selection -> SVG
6. Open SVG in a suitable application. We use Inkscape.
---
For putting it back in:
1. Click on 'Shapes'
2. Scroll all the way down to very bottom DefineShape.
3. Right click -> Add Tag After (DefineShape, doesn't matter which one, they all have the
issue.)
4. Replace / Replace - Updated Bounds and select the exported SVG. It'll be blank.
![Download](/flash/images/disk.png)
It's DefineSprite(450), not DefineShape4(450).
The sprites may contain links to other sprites.
When you export Sprite as SVG, these links are exported as SVG use commands.
Sprites can also contain clipping regions, which are exported as clipping SVG commands.
Shapes on the other hand, cannot link other sprites or shapes,
and also do not feature clipping.
When you try to import a SVG which contains use statement and/or clipping, into a shape,
it will fail.
We might somehow add support for use commands,
but clipping surely cannot be imported properly - SWF shapes just do not support that.
Your DefineSprite(450) features clipping and thus cannot be imported as shape.