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

Hoosha: Clicking play gets stuck on level reset #12026

Open
zanzlanz opened this issue Jul 13, 2023 · 3 comments
Open

Hoosha: Clicking play gets stuck on level reset #12026

zanzlanz opened this issue Jul 13, 2023 · 3 comments
Labels
A-avm1 Area: AVM1 (ActionScript 1 & 2) bug Something isn't working text Issues relating to text rendering/input timeline Issues relating to timeline animation

Comments

@zanzlanz
Copy link

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, so gotoAndPlay("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

@zanzlanz zanzlanz added the bug Something isn't working label Jul 13, 2023
@Lord-McSweeney Lord-McSweeney added the A-avm1 Area: AVM1 (ActionScript 1 & 2) label Jul 13, 2023
@n0samu n0samu added text Issues relating to text rendering/input timeline Issues relating to timeline animation labels Jul 18, 2023
@n0samu
Copy link
Member

n0samu commented Jul 18, 2023

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.

@Lord-McSweeney
Copy link
Collaborator

#5431 should fix this- the issue is that we should instead be going from 1-2-3-4-5-6-7-8-9, instead of 1-9. However, that approach does have some performance penalties.

@waspennator
Copy link

Still a problem as of latest nightly.

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) bug Something isn't working text Issues relating to text rendering/input timeline Issues relating to timeline animation
Projects
None yet
Development

No branches or pull requests

4 participants