Skip to content

Conversation

@Herschel
Copy link
Member

The Flash 4 VM was very simple and did not have these notions:

  • Prototype chain
  • Scope chain
  • Properties for child clips (TellTarget action used instead)
  • Magic properties like _x (GetProperty action used instead)

Avoid these features for v4 and earlier SWFs.

Herschel added 3 commits May 16, 2022 19:28
The Flash 4 VM was very simple and did not have these notions:
 * Prototype chain
 * Scope chain
 * Properties for child clips (`TellTarget` action used instead)
 * Magic properties like `_x` (`GetProperty` action used instead)
Change Infinity and NaN from virtual properties to normal variables
on the global object. These won't be seen by SWFv4 now that v4 no
longer inspects the scope or prototype chains, so there's no need
to hide these properties.
@Toad06
Copy link
Member

Toad06 commented May 17, 2022

The Orisinal games get stuck on the loading screen, for instance Critical Zone.

The following example should reproduce the issue:

_level0/:abc = "ABC";
trace(_level0/:abc); // "ABC" in Flash, "undefined" in this PR
trace(_level0); // "undefined" in Flash and this PR
trace(aBc); // "ABC" in Flash, "undefined" in this PR

Also, a strange thing is that the dot notation can usually be used in Flash Player and SWFv4...

o = {};
o.def = "DEF";
trace(o.dEf); // "DEF" in Flash and this PR

... but it won't work with _levelN:

_level0.ghi = "GHI";
trace(_level0.ghi); // "undefined" in Flash and this PR
trace(ghi); // (same thing)

Not sure if that really matters though.


Sample (SWF)

@danielhjacobs danielhjacobs added A-avm1 Area: AVM1 (ActionScript 1 & 2) T-fix Type: Bug fix (in something that's supposed to work already) T-compat Type: Compatibility with Flash Player and removed T-fix Type: Bug fix (in something that's supposed to work already) labels Sep 17, 2024
@danielhjacobs danielhjacobs added the waiting-on-author Waiting on the PR author to make the requested changes label Mar 28, 2025
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 waiting-on-author Waiting on the PR author to make the requested changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants