Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Fix stop() when executing attachMovie in DoInitAction #16384

Merged
merged 2 commits into from
May 28, 2024

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented May 20, 2024

This fixes a bug where the code in the first frame of a movie clip could have been executed after the second frame (so that instructions like stop did not work properly).

That is because when the first frame was executed in preload (e.g. for a sprite attached using attachMovie), the actions were queued, the second frame was executed in run_frame, and then the actions from the first frame were executed.

Ensuring that all actions are executed after preload fixes this issue.

This issue is related to #5443 as it improves support for mx.managers.FocusManager (by preventing the tabCapture object from disappearing).

See the test attach_movie_stop for the MWE.

@torokati44
Copy link
Member

Could you please check whether this changes anything related to #6144 ?

@kjarosh
Copy link
Member Author

kjarosh commented May 21, 2024

Could you please check whether this changes anything related to #6144 ?

For future reference: it does not seem to change anything, for me it worked on the desktop even without this patch.

@kjarosh kjarosh force-pushed the attach-movie-stop branch from ca87ae4 to af61146 Compare May 21, 2024 13:45
@danielhjacobs danielhjacobs added the waiting-on-review Waiting on review from a Ruffle team member label May 21, 2024
@Dinnerbone Dinnerbone enabled auto-merge (rebase) May 28, 2024 21:41
kjarosh added 2 commits May 28, 2024 23:46
This fixes a bug where the code in the first frame of a movie clip
could have been executed after the second frame
(so that instructions like stop did not work properly).

That is because when the first frame was executed in preload
(e.g. for a sprite attached using attachMovie), the actions were queued,
the second frame was executed in run_frame, and then the actions from
the first frame were executed.

Ensuring that all actions are executed after preload fixes this issue.
This test verifies that stop() works properly for a movie clip
attached with attachMovie in DoInitAction.
@Dinnerbone Dinnerbone force-pushed the attach-movie-stop branch from af61146 to 57c81a4 Compare May 28, 2024 21:47
@danielhjacobs danielhjacobs removed the waiting-on-review Waiting on review from a Ruffle team member label May 28, 2024
@Dinnerbone Dinnerbone merged commit fe4e180 into ruffle-rs:master May 28, 2024
17 checks passed
@kjarosh kjarosh deleted the attach-movie-stop branch May 28, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants