Skip to content

Fix get_url() not appending local vars to navigate_to_url_normalized() call - #24299

Open
Slavko-P wants to merge 8 commits into
ruffle-rs:masterfrom
Slavko-P:master
Open

Fix get_url() not appending local vars to navigate_to_url_normalized() call#24299
Slavko-P wants to merge 8 commits into
ruffle-rs:masterfrom
Slavko-P:master

Conversation

@Slavko-P

Copy link
Copy Markdown

Description

While trying to get Poptropica AS2 running I noticed Ruffle fails to append local variables (in this case "island" and "room") to POST request bodies thus resulting in a blank screen when transitioning scenes. This commit fixes the issue and finally puts Poptropica AS2 into a playable state on Ruffle.

Testing

  1. Download Poptropica AS2 from https://flashpointarchive.org/datahub/Legacy_Poptropica_Support
  2. Extract the archive
  3. Run a proper web server with PHP serving support (nginx, apache or lighttpd; python -m http.server WILL NOT WORK) with ./pop/content/www.poptropica.com/ as the root directory
  4. Edit the contents of ./pop/content/www.poptropica.com/getPrefix.php from "prefix=http%3A%2F%2Fwww.poptropica.com" to "prefix=http%3A%2F%2Flocalhost"
  5. Open a browser and go to "http://localhost/base.php", set AdScenes to enabled (checkmark)
  6. Go to "http://localhost/base.php?room=FlashpointStart", on the error screen, at the bottom click any gender
  7. Now use the mouse cursor to guide your character, and enter the blimp up above
  8. Click on any island and the game should be able to switch scenes from either the map or by clicking on various spots inside the islands

Note: I only ran "npm run test" and "npm run wdio -- --firefox" for testing, with everything passing

Checklist

  • I, a human, have self-reviewed this PR and fully understand the changes within.
  • I have made or updated tests where possible.
  • All of my commits are properly scoped, compile successfully, and pass all tests.
  • This PR does not make sense to split up into smaller PRs.
  • An LLM was involved in the authoring of this code.

Slavko-P added 2 commits July 25, 2026 14:47
…ized() call

While trying to get Poptropica AS2 running I noticed Ruffle fails to append local variables (in this case "island" and "room") to POST request bodies thus resulting in a blank screen when transitioning scenes. This commit fixes the issue and finally puts Poptropica AS2 into a playable state on Ruffle.
@evilpie evilpie added A-avm1 Area: AVM1 (ActionScript 1 & 2) needs-tests This PR needs regression tests to be added before it can be merged labels Jul 25, 2026
@Lord-McSweeney Lord-McSweeney added the T-fix Type: Bug fix (in something that's supposed to work already) label Jul 25, 2026
Comment thread tests/tests/swfs/avm1/movieclip_geturl/test.swf
@ChrisCPI ChrisCPI removed the needs-tests This PR needs regression tests to be added before it can be merged label Jul 27, 2026
@Slavko-P
Slavko-P requested a review from ChrisCPI July 27, 2026 11:58
@@ -0,0 +1,4 @@
this.createEmptyMovieClip("test",this.getNextHighestDepth());
test.value1 = "string";
test.value2 = 2;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if you add properties not on test: 1. in local scope, 2. in a test's child? What if the property is virtual (a getter)? What if the property has flags (line DONT_ENUM or VERSION)?

@kjarosh kjarosh Jul 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be also worth adding a second call on this instead of test and checking if it works the same way.

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-fix Type: Bug fix (in something that's supposed to work already)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants