You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On SWF6, calling a function changes the active target_clip according to the callee's definition location.
Currently Ruffle handles this behavior as expected:
However SWF5 seems to behave differently. Instead of changing the active target_clip, it remains unchanged and same as the caller'starget_clip.
Ruffle doesn't handle this behavior and always behaves like SWF6.
The attached examples are identical except for their SWF version (5 vs. 6).
Notice that only the yellow circle moves in target_clip_swf5.zip, but both the yellow circle and the green square move in target_clip_swf6.zip.
Changing the line mentioned above from af.base_clip, to activation.base_clip, (plus making it pub) seem to change the behavior from SWF6 to SWF5. I feel like selecting either af.base_clip or activation.base_clip depending on the SWF version is the proper fix, but I'm not 100% sure about it.
The text was updated successfully, but these errors were encountered:
Seems accurate to me, would you like to make a PR with the fix and test case? Here's another test case using gotoAndPlay (which affects the target clip): gotoandplay_swf5.zip
On SWF6, calling a function changes the active
target_clip
according to the callee's definition location.Currently Ruffle handles this behavior as expected:
ruffle/core/src/avm1/function.rs
Line 324 in 9df7fac
However SWF5 seems to behave differently. Instead of changing the active
target_clip
, it remains unchanged and same as the caller'starget_clip
.Ruffle doesn't handle this behavior and always behaves like SWF6.
The attached examples are identical except for their SWF version (5 vs. 6).
Notice that only the yellow circle moves in
target_clip_swf5.zip
, but both the yellow circle and the green square move intarget_clip_swf6.zip
.target_clip_swf5.zip
target_clip_swf6.zip
Changing the line mentioned above from
af.base_clip,
toactivation.base_clip,
(plus making itpub
) seem to change the behavior from SWF6 to SWF5. I feel like selecting eitheraf.base_clip
oractivation.base_clip
depending on the SWF version is the proper fix, but I'm not 100% sure about it.The text was updated successfully, but these errors were encountered: