Question about swf library, extends, and addFrameScript

Hi there
I have some questions about using swf library and addFrameScript
So far I know I can use generate=“true” to generate the class for the swf assets MovieClip
then extends the generated class
e.g. I have a Hero in my library
class SuperMan extends Hero {
public function new(){
I works , but what if there is other MovieClips with custom classes
e.g. I have a Hero in my library , and in this Hero there is another MovieClip - Gun in frame 10,
now how can I addFrameScript to the Gun class , if I extends the Gun class, no effect in the Gun inside the Hero ,since the Gun instance was created by Hero in the timeline, I know I can use getChildByName then addFrameScript at runtime (gun.addFrameScript…), but I feel it’s not decent
so my question: Is there a good way to solve this ? I want the Gun MovieClip be the CustomGun class instead of the simple MovieClip

Hi there
I just found a solution:
Step 1: edit swf library - Tools.hx - function processLibraries
find this line :
Comment or delete it
Step 2: cd to swf library then rebuild it
haxe rebuild.hxml
Step 3: open _generated folder and copy haxe files to your Source folder
And then you can edit the exported classes for your swf assets
Not sure if I’m doing right way, but it works

Open to suggestions for how we could merge user-written scripts with SWF-generated asset classes in a sensible way. As you can tell, the technology is there, it’s just a matter of what the workflow can/should look like