Repository navigation
Conversation
fl.controls.ScrollBar is an ActionScript 3.0 class included with Adobe Animate (and Flash Pro before that). It is not built into Flash Player or AIR. Even though the AS3 code is included with Animate, it is not released under an open source license. Anyone with an Animate license should be able to port the original AS3 code to Haxe, if they need it. However, they would not be able to legally share that code with anyone who does not also have their own Animate license. Someone could probably write a custom implementation using the same API and all new code. If they do, that should be a separate library from the OpenFL, Lime, and SWF libraries. |
…g them (closes #46) Generated MovieClip and SimpleButton classes always initialized from the library they were generated for, so another library exporting the same class name created instances with the wrong symbol. Libraries now record the symbol being instantiated, and generated classes use it when they are that class or one of its base classes, falling back to their own library when created with "new".
…g them (closes #46) Generated MovieClip and SimpleButton classes always initialized from the library they were generated for, so another library exporting the same class name created instances with the wrong symbol. Libraries now record the symbol being instantiated, and generated classes use it when they are that class or one of its base classes, falling back to their own library when created with "new".
When a reprocessed library no longer generated a class, its file was deleted right away, even when another library, cached and not reprocessed, still generated the same class (a symbol class shared by several SWFs). That library still listed it for the build, which then stopped with "Type not found". The deletions now wait until every library has listed its classes, and skip the classes still listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added a fix for a case this PR's class cleanup got wrong: when a reprocessed library no longer generates a class, its file was deleted right away, even when another library, cached and not reprocessed, still generates the same class (a symbol class shared by several SWFs). That library still lists the class for the build from its |
Summary
This PR fixes two separate Animate-related issues.
Generated Animate linkage classes were not being reliably included in the Haxe build when
generate="true"was enabled on libraries. In practice, this meant some symbols that should have been instantiated as their exported class fell back to genericMovieClipinstances on C++/OpenFL. For the game case that motivated this work, nested collision symbols such asNavCollisionRectanglethen became impossible to identify and remove by class name, which caused the visible red collision overlays. The first part of this PR fixes the tooling side so thatgenerate="true"works correctly for the selected libraries.Once generated classes are enabled across multiple libraries, duplicate exported class names can resolve to the wrong library at runtime. Generated classes were effectively tied to a specific
UUID + symbolID, so another library exporting the same class name could instantiate the wrong symbol. The second part of this PR fixes that runtime resolution so generated classes are bound to the library that is actually instantiating them.Changes
Tools.hxso generated classes are actually added to the Haxe build and restored from cache correctlyMovieClipclasses resolve against the runtime library being instantiated, instead of a fixed library/symbol pairSimpleButtonclassesBitmapDataaligned with the same strategy for consistency/future-proofingRepro
SWFAnimateCollisionRepro.zip
A minimal repro project is included to demonstrate:
MovieClipandSimpleButtonexports when the runtime-library fix is removedfl.controls.ScrollBar, which does not exist on Haxe/OpenFL. This PR does not fix that issue, it is included only to document it in case someone wants to investigate it separately.Note
This PR depends on #40.