ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.69k stars 815 forks source link

"Score submit" functions in AS3 don't work (Detailed explanation) #12100

Open Amseog opened 1 year ago

Amseog commented 1 year ago

Describe the bug

I host a private little message board (MyBB software) with an arcade plugin for .SWF games (MyArcade) -- and thanks to Ruffle, most of our old AS1 and AS2 games are now working again. With the continued updates to Ruffle, some of our old collected AS3 games have also started working again, but so far, all of them have trouble transmitting the game scores properly to our arcade system (after a game over).

With the help of decompiling software, I was able to compare the "submit score" functions in some of our working AS2 games with those in non-working AS3 games.

Example for a working AS2 score submit: on(release){ sendscore = new LoadVars(); sendscore.gscore = _root.score; sendscore.gname = "RocketShip"; sendscore.send("index.php?act=Arcade&do=newscore","_self","POST"); }

Example for a non-working AS3 score submit: private function onclick(param1:MouseEvent) : * { trace("It's easier than you think!"); url = "index.php?act=Arcade&do=newscore"; request = new URLRequest(url); variables = new URLVariables(); variables.gname = "JogginginHell"; variables.gscore = String(Main.highScore); request.data = variables; request.method = URLRequestMethod.POST; navigateToURL(request,"_self"); }

Both games worked perfectly back when SWFs were still supported. Since I noticed that both the variables ("gscore" and "gname") as well as the targeted URL are still the same, I figure that Ruffle does not support some part of the function at the bottom.

Expected behavior

Both functions should submit the same data.

Affected platform

Desktop app

Operating system

Windows 10

Browser

Google Chrome

Additional information

No response

Amseog commented 1 year ago

Hi there, may I ask if this has received any attention by the team...? I hope that it might help to remove an error that probably affects a lot of Flash games on the web! Thanks a lot in advance. =)