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.

#1843 How to make sure new images and sounds load in
Author:
Luxe3710

Date created:
Type: question
Visibility: Everybody
Assigned to:
Labels: Tag position
State: closed 

This might be a long shot, but I'd love some help on this. Adding new Sounds or Images
into the SWF doesn't allow them to be accessed via the ActionScript
SFXList[sfx].attachSound((!!noPrefix ? "" : "sfx_") + sfx);
attaches a null file when pointed at a newly created sound.
Similarly, I have the same issue loading bitmaps
TILESHEET = flash.display.BitmapData.loadBitmap("tilesheet_" + tileset);
Renaming an existing image will let it be pulled in here, but adding new ones doesn't
work. I've been using the export assets tag to name the new assets as expected. It doesn't
appear that the sounds are being loaded in during the loading screen, though I at least
found that some internal images were being placed and removed in the loading screen.
Adding the new images to that shape that's loaded in and instantly removed doesn't fix the
matter however.
Anyone have any clue as to why this might happen?
Read #1689 to understand the issue.
I assume your flash uses AS2. This means physical placement of bitmaps and/or sounds
inside the file must be before AS segments that refer to them. I don't think this
decompiler automatically determines the placement, and instead simply appends new assets
at the end of file.
Thank you, you are absolutely wonderful for confirming that! It does indeed use AS2, so it
sounds like I need to edit the new tilesets to be located next to the existing ones via
Hex Editing to solve this.
Well, I'm closer now, but I am stuck because HxD shows completely different hex code than
JPEXS. I'm assuming that's because the game must be encrypted, so I guess I need to crack
that next...
Leaving a trail here for anyone who finds this in the future, just right click the top
level file and select 'save as file' to make the hex code editable.
Okay, it's now working! For anyone looking in the future, I just placed the export assets
tag directly under the asset to be exported, and that seems to consistently work.
In FFDec 16.0.0, you can move tag to proper position with right click context menu -> move
tag.
State: new→opened
State: opened→closed