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#1970 Empty frames missing in decompiled fla, Auto rename identifiers not working without deobfuscation
Author: Grubsic
Date created:
Type: bug
Visibility: Everybody
Assigned to:
State: closed
There's a small issue when decompiling a fla, if the timeline of a movieclip (or the main
timeline) has empty frames (not keyframes), the decompiler just omits them, I know has no
logic, but I worked with some projects that have empty frames at the end needed to hide
some stuff, here some example images, and SWF I created to show it.
The Original.png is the original fla timeline
The Export.png is the result fla from the decompiler
The SWF version is 32
I am not saying that the end empty frames must be left, but I had lot of swfs that needed
them (becasue they sync the timeline pos, I know, sounds ilogic, but appears a lot), But
maybe create an option to leave last empty frames?
Thanks!
IMO such an information (empty non-keyframes at the end) is lost in the published SWF and
a decompiler cannot derive it from there.
BTW if you attach the recompiled flash (export fla with ffdec, open it and publish swf
with flash cs), we can compare it to the original. I think the frame structure would be
identical, but who knows...
"Sync the timeline pos"? What does that mean? How does that work?
I can make all layers the same frame count as the longest layer,
but I still don't see a point.
Sorry for late answer and the ugly explaination haha, here a better one:
Imagine we have 2 MovieClip (Let's call them A and B), both have, for example, 10 frames,
in each frame of both Movieclips there are some graphics, now some actionscript code
controls which frame displays, this code syncs their time lines, if MovieClip A is
displaying the frame number 7, the MovieClip B displays the frame 7 too, works like an
array sync:
MC_A[i] == MC_B[i]
Now, the MovieClip B has the last 3 frames empty (or keyframes) because when MovieClip A
is in those frames, MovieClip B has to show nothing (if you don't leave empty frames, the
movieclip always shows the last frame if we do MC_A[i] == MC_B[i]).
I am sorry if the explaination is not good, but if you need more information, I am more
than available to explain more.
I forgot to add that if the MC_B has 6 frames only and the MC_A has 10, when doing
"MC_A[i] == MC_B[i]", MC_B is gonna show the frame number 6, displaying graphics that are
not supposed to be shown, that's why some people adds empty frames.
I made a quick demo to show what I mean:
Example.fla -> Original Fla
Example.swf -> Original SWF generated from original .fla
Example_but_decompiled -> Pretty obvious hahaha
Please observe the timelines of the colorful squares, as I said, i dont think is a bug,
but maybe an option to enable leaving those frames ... maybe? Thanks
I forgot to add again some info: The examples are interactive!
What if you make the last frame a keyframe and remove all items that don't need to show
from the stage on that frame? I know it can be a bother, I'm just suggesting. Also I'd
still like to see a recompiled .swf, not decompiled .fla. FFDec can't open/import .fla
files, so I can't make a comparison.
Grubsic: You are right, this needs to be fixed.
These two cases are different for sprites,
I'll take a look...
empty_frames_on_sprite_end.png (4 KiB)no_empty_frames_on_sprite_end.png (4 KiB)
This is fixed in nightly 2472.
State: new→upgraded
yes, works like a charm!, but I would like to report another bug with this exact same
version (nightly 2472), I hope there's no problem reporting here in the same issue:
Some are not opened, they crash directly when attempting to read, for example, this
classic game that i used to spend hours when I was a kiddo.
I left the stack trace, and some pictures of the error panel.
> hope there's no problem reporting here in the same issue
Yes it is a problem. Please report only one problem per issue. If you encounter a
different problem in different file, then create new issue. Otherwise we can easily get
lost in the issues.
To your Game.swf file:
The file is obfuscated and you have "automatic deobfuscation" turned off, but "auto rename
identifiers" turned on.
For this file to work correctly "automatic deobfuscation" needs to be turned on.
I also recommend "auto rename identifiers" turned off as there might be problems with file
saving.
On this specific file I also recommend to turn on "Remove single assigned obfuscated
declarations" - see attached screenshot.
I also fixed FFDec to load properly on this kinds of configuration (nightly 2473), but it
still produces errors to the log since you do not have deobfuscation enabled on obfuscated
file.
single_assigned_obfuscated.png (10 KiB)
I understand! I will delete previous JPEXS configs to avoid making things load not
properly
And and I am sorry for using one issue for two, :P, not happening again, if something else
happens, I will create a new issue. Thanks!
State: upgraded→closed
Title: Empty frames missing in decompiled fla→Empty frames missing in decompiled fla, Auto rename identifiers not working without deobfuscation
Title: Empty frames missing in decompiled fla→Empty frames missing in decompiled fla, Auto rename identifiers not working without deobfuscation