Skip to content

Swf library load fix#48

Closed
barisyild wants to merge 2 commits into
openfl:masterfrom
barisyild:swf-library-load-fix
Closed

Swf library load fix#48
barisyild wants to merge 2 commits into
openfl:masterfrom
barisyild:swf-library-load-fix

Conversation

@barisyild

Copy link
Copy Markdown
Contributor

No description provided.

barisyild and others added 2 commits April 23, 2026 23:17
The Flash/AIR SWFLibrary was missing rootPath support that the other
library types (AnimateLibrary, SWFLiteLibrary) already had. This caused
non-embedded SWF files to fail loading because the path resolution used
the wrong base directory.

- Add rootPath field and __fromManifest override to SWFLibrary, matching
  the pattern used by AnimateLibrary and SWFLiteLibrary
- Fix rootPath in manifest to empty string since SWF files are placed at
  the output root, not under lib/
- Preserve the -swf-lib fallback for backwards compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The else block (applicationDomain = currentDomain) was reached in the
non-embed case because paths.exists(id) is false when the SWF is not in
the manifest's asset list. This caused the file to never be loaded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant