Hi, I’m new to both openfl and Haxe and I’m working on remaking a flash program written in AS2. I’ve been able to import the whole swf library using Assets.getMovieClip, but I would like to be able to access individual generated classes so I can use the @:bind syntax.
I only have access to the swf file, and none of the objects have been exported for ActionScript. I tried to use the JPEXS decompiler to create an ActionScript linkage, but this doesn’t seem to be picked up by the generator.
I’ve double checked that I have preload="true" generate="true" in my project.xml.
Is there anything I could try to do to make these objects be recognised by the class generator?
Additionally, is there any way to see a list of all the generated classes, so I know it’s not an issue with my code? (I’ve seen some people talk about a _generated folder, which isn’t present for me)
You are delving into an area in which my memory is foggy but I will attempt to help. I have a couple thoughts:
I could be wrong, but I suspect that using an AS2 movieClip might have reduced compatibility versus an AS3 one.
Did you try to use the openfl process command? It is mentioned here (possibly outdated blog post) and also documented here. I don’t know if it supports AS2 but it could improve the experience. If you inspect the contents of the .bundle file you could see the classes I think.
I checked the sample library using openfl process and there were className tags in the JSON that weren’t present in the processed AS2 app. So I did a bit more digging, and it just turns out the SWF library doesn’t support AS2, which is a shame.
So it looks like the path of least resistance is to manage all the classes manually, for the time being.