Skip to content

Conversation

@SuchAFuriousDeath
Copy link
Contributor

Fixes #22395

When a lower-version SWF (e.g., SWF6) loads a higher-version SWF (e.g., SWF8) via loadMovieNum, the loaded movie's _levelN clip had the wrong __proto__. This caused the loaded movie to be unable to see properties added to its version's MovieClip.prototype.

In loader.rs, get_or_create_level creates the level clip using the loader's movie version for the prototype. Then replace_with_movie updates the movie reference but doesn't update __proto__. So when SWF6 loads SWF8 into _level2, the clip ends up with SWF6's prototype instead of SWF8's.

@kjarosh kjarosh added A-avm1 Area: AVM1 (ActionScript 1 & 2) waiting-on-review Waiting on review from a Ruffle team member T-compat Type: Compatibility with Flash Player labels Jan 5, 2026
@kjarosh kjarosh removed the waiting-on-review Waiting on review from a Ruffle team member label Jan 6, 2026
When a lower-version SWF loads a higher-version SWF via loadMovieNum,
the target clip's prototype was not updated to match the loaded movie's
version. This caused the loaded movie to be unable to see properties
added to its version's MovieClip.prototype.

After replace_with_movie, update __proto__ to use the correct prototype
for the loaded movie's SWF version.

Fixes ruffle-rs#22395
@kjarosh kjarosh merged commit b15cd0a into ruffle-rs:master Jan 7, 2026
25 of 26 checks passed
@SuchAFuriousDeath SuchAFuriousDeath deleted the loader-version branch January 7, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-avm1 Area: AVM1 (ActionScript 1 & 2) T-compat Type: Compatibility with Flash Player

Projects

None yet

Development

Successfully merging this pull request may close these issues.

avm1: Character in Sunny Day Sky falls through the platform (regression)

2 participants