ruffle-rs / ruffle

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

ActionScript 3 support #10743

Open kschoenberger opened 1 year ago

kschoenberger commented 1 year ago

Hi, how is the implemention for ActionScript 3 support going? Based on the outdated roadmap it has been ~25%. It was mentioned that the implementation will take ~4 months.

Can anyone please comment on that?

BR, Klaus

p0008874 commented 1 year ago

Hi! You should look at https://ruffle.rs/avm2.html

Lord-McSweeney commented 1 year ago

The roadmap is extremely outdated. This is a (very) rough estimate, but most games should be playable by the end of this year.

danielhjacobs commented 1 year ago

The outdated Roadmap said that "Initial ActionScript 3.0", as in basic support that would allow simple games to work, could take 4 months. While that was admittedly far too optimistic at the time (it took years), basic support can be considered complete already, and simple games are working. The problem is, many games are not simple, so there is still a lot of work needed for more complex games to fully work.

kschoenberger commented 1 year ago

Thanks for your immediate replies. So I'll be patient and watch the progress bar at https://ruffle.rs/avm2.html I don't want to play a game, my use case is to access an interface of an old devices controller. Currently it got stuck in the initialization. Not sure what part of the API implementation it is missing.

danielhjacobs commented 1 year ago

Assuming you're using a web browser, you may be able to open the developer console with F12 and refresh the page, and you may see relevant error messages there. If you then post them it may be possible to figure out what part of the API it's currently stuck on.

kschoenberger commented 1 year ago

got:

New Ruffle instance created (WebAssembly extensions: ON) ruffle.js:1677:17 WebGL warning: getSyncParameter: ClientWaitSync must return TIMEOUT_EXPIRED until control has returned to the user agent's main loop. (only warns once)

Loading SWF file WebApp.swf ruffle.js:1826:25 XHRGET http://192.168.2.100/WebApp.swf [HTTP/1.1 200 OK 23178ms]

INFO core/src/player.rs:339 Loaded SWF version 23, resolution 500x375 @ 24 FPS 339.js:767:21

WebGL warning: getSyncParameter: ClientWaitSync must return TIMEOUT_EXPIRED until control has returned to the user agent's main loop. (only warns once)

WARN core/src/stub.rs:126 Encountered stub: AVM2 flash.utils.Dictionary constructor with weak keys 339.js:767:21

WARN core/src/stub.rs:126 Encountered stub: AVM2 flash.net.registerClassAlias() 339.js:767:21

WARN core/src/stub.rs:126 Encountered stub: AVM2 flash.display.InteractiveObject.tabIndex setter 339.js:767:21

ERROR core/src/avm2/events.rs:419 Error dispatching event EventObject(EventObject { type: "complete", class: flash.events::Event, ptr: 0x3212798 }) to handler FunctionObject(FunctionObject { ptr: 0x5a6228 }) : ReferenceError: Error #1069: Property flash.events::PressAndTapGestureEvent not found on global and there is no default value. at spark.components.supportClasses::GroupBase/addEventListener() at mx.core::UIComponent() at spark.components.supportClasses::GroupBase() at spark.components::Group() at components::CommMachineQueue() at WebApp() at _WebApp_mx_managers_SystemManager/create() at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow() at mx.managers::SystemManager/initializeTopLevelWindow() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler() at flash.events::EventDispatcher/flash::events::EventDispatcher::dispatchEvent() at mx.preloaders::Preloader/timerHandler() at flash.events::EventDispatcher/flash::events::EventDispatcher::dispatchEvent() at flash.utils::Timer/onUpdate() 339.js:767:21

WebGL warning: getSyncParameter: ClientWaitSync must return TIMEOUT_EXPIRED until control has returned to the user agent's main loop. (only warns once) 4

ERROR core/src/avm2/events.rs:419 Error dispatching event EventObject(EventObject { type: "enterFrame", class: flash.events::Event, ptr: 0x5e7c68 }) to handler FunctionObject(FunctionObject { ptr: 0x584170 }) : TypeError: Error #1034: Type Coercion failed: cannot convert String("") to XMLList. at mx.utils::ObjectUtil$/getClassInfo() at mx.utils::ObjectUtil$/internalCompare() at mx.utils::ObjectUtil$/compare() at _WebApp_Styles$/init() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler() at mx.managers::SystemManager/docFrameListener() 339.js:767:21

WebGL warning: getSyncParameter: ClientWaitSync must return TIMEOUT_EXPIRED until control has returned to the user agent's main loop. (only warns once) 26

After reporting 32, no further warnings will be reported for this WebGL context.

################################################################################

https://ruffle.rs/avm2.html tells me that flash.events.PressAndTapGestureEvent is still missing. Is there any workaround I could test?

Thanks for supporting me.

BR, Klaus ​

n0samu commented 1 year ago

If you just need to access the app, you can use a Flash-enabled browser such as this one: https://archive.org/details/basilisk-portable-with-flash

kschoenberger commented 1 year ago

Thanks. I took that already into consideration, but I need a solution with any standard browser.