Skip to content

Preserve serialized instance properties in Animate and SWFLite exports#44

Open
Tutez64 wants to merge 1 commit intoopenfl:masterfrom
Tutez64:bugfix/preserve-instance-properties
Open

Preserve serialized instance properties in Animate and SWFLite exports#44
Tutez64 wants to merge 1 commit intoopenfl:masterfrom
Tutez64:bugfix/preserve-instance-properties

Conversation

@Tutez64
Copy link

@Tutez64 Tutez64 commented Mar 25, 2026

This preserves serializable instance properties assigned by SWF scripts in both Animate and SWFLite export paths.

The exporter now extracts those properties from ABC data, stores them in the generated output, and restores them at runtime when symbols are instantiated.

It helps preprocessed exports retain data that would otherwise only be available when loading the original SWF directly.

Validated on both AnimateLibrary and SWFLite export/runtime paths, including SWFLite serialize/unserialize and root symbol instantiation.

I did not prepare a dedicated minimal reproduction project because the change is localized and was validated directly on affected assets. If needed, I can provide one.

@joshtynjala
Copy link
Member

I did not prepare a dedicated minimal reproduction project because the change is localized and was validated directly on affected assets. If needed, I can provide one.

Can you please add it by default when you open a PR? It would really be helpful!

@Tutez64
Copy link
Author

Tutez64 commented Mar 25, 2026

Yes. I prepared a minimal reproduction project: SWFInstancePropertiesRepro.zip

The included SWF is a tiny local test asset whose document class assigns dynamic properties on the root MovieClip.

The repro exercises both AnimateLibrary and SWFLite export/runtime paths.

Run:

  • haxe test.hxml
  • neko run.n

Expected result with this patch (and also the EOF fix from #40):

  • OK: Animate and SWFLite preserved root instance properties.

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.

2 participants