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

Cannot load swf file #34

Open
flashmandv opened this issue Jan 28, 2023 · 2 comments
Open

Cannot load swf file #34

flashmandv opened this issue Jan 28, 2023 · 2 comments

Comments

@flashmandv
Copy link

Hello and thank you for the awesome examples.

However I could not make the swf example to run (nor the NyanCat demo).

The AssetLibrary.loadFromFile ("layout.bundle") is always returning 404 error.
The onProgress callback is called with completed bytes so it must be loading it.
The openfl process assets/layout.swf command is also completing successfully.
I tried the swf file from the sample, tried recompiling it. Tried different loading paths..nothing seems to work.
Updated to the latest openfl 8.9.6 and royale-js 0.9.8 but nothing seems to work.
Can you please try to rebuild and see if it still works?
If you can also share the bin folder it would be great. I think that the bundle generation is making some sort of problem.

Thank you

@flashmandv
Copy link
Author

UPDATE: I think I know what is wrong. I need to alternative to this line in haxe project.xml file
<library path="assets/layout.swf" id="swf-library" />
But how do I do that in the asconfig.json ? I tried this line but it did not work:
"library-path": [ "bin/js-debug/swf-library.bundle" ],

Any ideas on how the swf/bundle is embed in the royale project?

@Fancy2209
Copy link

Hello and thank you for the awesome examples.

However I could not make the swf example to run (nor the NyanCat demo).

The AssetLibrary.loadFromFile ("layout.bundle") is always returning 404 error. The onProgress callback is called with completed bytes so it must be loading it. The openfl process assets/layout.swf command is also completing successfully. I tried the swf file from the sample, tried recompiling it. Tried different loading paths..nothing seems to work. Updated to the latest openfl 8.9.6 and royale-js 0.9.8 but nothing seems to work. Can you please try to rebuild and see if it still works? If you can also share the bin folder it would be great. I think that the bundle generation is making some sort of problem.

Thank you

This has been fixed, only swf-lite is supported, use openfljs process instead of openfl to process the swf as shown in the now updated sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants