If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : You can now close your own issues and reopen them later if needed. You can also comment closed issues.
List of issues#2678 How animated subframes with different frame count are reconciliated ?
Author:
Astariul
AstariulDate created:
Type: question
Visibility: Everybody
Assigned to:
State: closed 

In the linked SWF file, the sprite with chid=157 has 5 frames.
The third frame is an animation (via subframes).
It has 2 subsprites, the first one has 14 frames, the second one has 60 frames.
FFDec display the resulting animation by looping the first animation, keeping the same
framerate for both subsprites.
I expected the first animation to "stretch" to fit the second animation.
Not sure I'm being very clear, here is a graph of what I mean.
Current behavior :
┌──────────────────────┐
│ S1 │
└──────────────────────┘
┌──────┐┌──────┐┌──────┐
│ S2 ││ S2 ││ S2 │
└──────┘└──────┘└──────┘
Expected behavior :
┌──────────────────────┐
│ S1 │
└──────────────────────┘
┌──────────────────────┐
│ S2 (slowed) │
└──────────────────────┘
o4.swf (5,278 KiB)As long as the contents of frame at given depth stays the same,
time variable for it is increased.
Each subsprite is then displayed on (time modulo its spriteFrameCount) frame.
When the subsprite has subsprites, then they are displayed with their own time variable
based on how many frame tick their depths stay the same.
There is only single framerate and that is SWF global frameRate.
I cannot show subsprites with different framerate.
If SWF has 24fps, the subsprites must be also 24fps.
Example:
Situation on single frame when SWF has framerate of 1 fps:
Imagine three sprites:
S1 - 5 total frames
S2 - 10 total frames
S3 - 3 total frames
they are placed on frame 1 of the SWF and there are no other SWF frames.
(we gonna index frames by 0)
time 0 - S1:0, S2:0, S3:0
time 1 - S1:1, S2:1, S3:1
time 2 - S1:2, S2:2, S3:2
time 3 - S1:3, S2:3, S3:0 - S3 processed its 3 frames, starting again from 0
time 4 - S1:4, S2:4, S3:1
time 5 - S1:0, S2:5, S3:2 - S1 processed its 5 frames, starting again
...
time 10 - S1:0 , S2:0, S3:1 - S2 processed its 10 frames, starting again, Also S1
The time is calculated per each SWF depth which do not changes.
Is it clearer now?
State: new→opened
Thanks for the explanation, this is clear.
(For my case, I explored my SWF more in details : there is an AS script that stop the
sprite animation (the one with only 14 frames), so that's why the animation is different
in-game and in FFDec !)
State: opened→closed
