ruffle-rs / ruffle

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

Kings Rush: Variable Main is not defined #14282

Open MartySVK opened 7 months ago

MartySVK commented 7 months ago

Describe the bug

After clicking on Play, I can see this error:

ERROR ruffle_core::avm2::events: Error dispatching event EventObject(EventObject { type: "PlayGame", class: flash.events::Event, ptr: 0x23bd3bfa740 }) to handler FunctionObject(FunctionObject { ptr: 0x23bbccee0f0 }) : ReferenceError: Error #1065: Variable Main is not defined.

Expected behavior

progress the game

Content Location

Game URL - https://www.gameflare.com/online-game/kings-rush/ SWF URL - https://data.gameflare.com/games/5602/ylMnWbTFlbb9ez.swf

Affected platform

Desktop app

Operating system

Windows 10

Browser

No response

Additional information

No response

MartySVK commented 7 months ago

it is Playhub game, so maybe similar to https://github.com/ruffle-rs/ruffle/issues/13653 ?

MartySVK commented 3 weeks ago
Error dispatching event EventObject(EventObject { type: "PlayGame", class: flash.events::Event, ptr: 0x6fac258 }) to handler FunctionObject(FunctionObject { ptr: 0x458f8e0, name: Ok("Preloader/startup()") }) : ReferenceError: Error #1065: Variable Main is not defined.
at global/flash.utils::getDefinitionByName()
at Preloader/startup()
at flash.events::EventDispatcher/flash::events::EventDispatcher::dispatchEvent()
at mc_Preloader/playGame()
Aaron1011 commented 3 weeks ago

This makes it slightly further with --load-behavior blocking. To work with the default preloader, it looks like we need gotoAndPlay(2) to work from the Preloader constructor, even if frame 2 hasn't been loaded yet.

The next thing this needs is flash.display.Graphics.readGraphicsData