Open zanzlanz opened 1 year ago
This happens because the level
variable is actually a text field variable, defined by the variablename
field of DefineEditText 38, 123, and 127, which are placed on frames 4 and 38. The game jumps straight from frame 3 to frame 39, but Flash Player defines the variables set by the text fields in the intermediate frames, including the level
variable.
Here is a minimal reproduction of this behavior: TextVarTimeline.zip
In this example, the lv
variable is defined by a text field placed on frame 5, and we jump straight from frame 1 to frame 9. Yet Flash Player still defines the variable and the value is read successfully.
Still a problem as of latest nightly.
Describe the bug
SWF: https://zanzlanz.com/Games/Hoosha.swf Flash: https://zanzlanz.com/g/Hoosha Self-hosted: https://zanzlanz.com/g/Hoosha&Ruffle
Clicking the "play" on the main menu using the code
code
will cause the game to remain on the level reset frame (39), locking the game. Using any other valid code (z
, for example) will activate the associated level properly.I'll take a guess that this may be because
_root.level
is still undefined in only this situation, sogotoAndPlay("level" + level);
fails to parse to "level1" in the current implementation.Expected behavior
In the Flash version, clicking "play" with the code
code
will reset and proceed to frame labelled "level1", as hoped.Affected platform
Desktop app
Operating system
Windows 10
Browser
Chrome 114
Additional information
No response