ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

AVM2: Loader: Non-public property flash.events:IEventDispatcher::addEventListener not found

Open robinheidrich opened this issue 1 year ago • 4 comments

Describe the bug

It seems that addEventListener cannot be used with contentLoaderInfo of Loader.

The following error is displayed in the console:

AVM2 error: Non-public property flash.events:IEventDispatcher::addEventListener not found on Object

Expected behavior

Correct implementation of addEventListener property for contentLoaderInfo of Loader.

Affected platform

Self-hosted version

Operating system

Windows 11

Browser

Google Chrome 105.0.5195.127

Additional information

This is the part of the code that does not work:

var tRSLLoader: Loader = new Loader();
tRSLLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.RSLInitListener);

Reference: https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Loader.html

robinheidrich avatar Sep 18 '22 01:09 robinheidrich

Is this with the most recent Ruffle verison? I just tried compiling it and it worked. Can you please show which SWF this fails on?

adrian17 avatar Sep 18 '22 10:09 adrian17

@adrian17 I am using the latest nightly version.

image

Here is the SWF file I use:

PanfuOriginal.zip

robinheidrich avatar Sep 18 '22 14:09 robinheidrich

I tried to remove the part of the code and the error still occurs. Ruffle says the error happens in ApplicationLoader.

But seems to be somewhere else?

robinheidrich avatar Sep 18 '22 19:09 robinheidrich

This is due to LoaderInfo not being fully implemented (it is currently stubbed)

Bale001 avatar Sep 21 '22 00:09 Bale001

Is there anywhere to track the development on it? I'd like to try Ruffle with my SWF, but without the implementation of LoaderInfo it won't load further.

robinheidrich avatar Sep 24 '22 02:09 robinheidrich

Fixed with the latest Ruffle nightly version. Thanks for your hard work!

robinheidrich avatar Mar 18 '23 01:03 robinheidrich