Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new Loader().contentLoaderInfo.loaderURL returns file:// instead of whole path #14217

Open
evilpie opened this issue Nov 28, 2023 · 4 comments · May be fixed by #17717
Open

new Loader().contentLoaderInfo.loaderURL returns file:// instead of whole path #14217

evilpie opened this issue Nov 28, 2023 · 4 comments · May be fixed by #17717
Labels
A-avm2 Area: AVM2 (ActionScript 3) bug Something isn't working

Comments

@evilpie
Copy link
Collaborator

evilpie commented Nov 28, 2023

In Flash new Loader().contentLoaderInfo.loaderURL returns the whole path of the SWF, in Ruffle it's just file:///.

The value probably comes from either SwfMovie::empty or SwfMovie::empty_fake_compressed_len.

@danielhjacobs
Copy link
Contributor

https://github.com/ruffle-rs/ruffle/blob/master/core/src/avm2/globals/flash/display/loader.rs#L41: Seems the comment here was not a good idea: "Some LoaderInfo properties (such as 'bytesLoaded' and 'bytesTotal') are always accessible, even before the 'init' event has fired. Using an empty movie gives us the correct value (0) for them."

@evilpie
Copy link
Collaborator Author

evilpie commented Nov 28, 2023

@danielhjacobs
Copy link
Contributor

@evilpie
Copy link
Collaborator Author

evilpie commented Nov 28, 2023

See also #13965, because even with the fixed URL the RegExp still fails anyway.

@Lord-McSweeney Lord-McSweeney added bug Something isn't working A-avm2 Area: AVM2 (ActionScript 3) labels Nov 28, 2023
evilpie added a commit to evilpie/ruffle that referenced this issue Aug 31, 2024
@evilpie evilpie linked a pull request Aug 31, 2024 that will close this issue
evilpie added a commit to evilpie/ruffle that referenced this issue Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-avm2 Area: AVM2 (ActionScript 3) bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants