Question

My workflow usually goes like this: i create a symbol in Flash IDE with textfields, containers, etc. Then I select "export for actionscript" and type in the classname (automatic declaration of stage instances, of course, is off).

Then i create a corresponding classfile in FDT and declare all this textfields and other objects that are in my symbol. This is pretty routine and boring process that takes a lot of time.

Is there a way to automate it? Maybe some plugin for flash IDE that will automatically create a class file based on symbol exported for AS?

Update: So, following the answer Pavel fljōt provided, i wrote my own command to accomplish this task. It is now available on Adobe Exchange here: http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=3021022

Was it helpful?

Solution

You could use JSFL to work with .fla library. You can write a script that runs through library items, finds the ones exported for AS and creates .as file you need (if it's not created yet, not to overwrite your existing one for instance). (To create public properties you got to run through objects on symbol stage, grab their names and types to create appropriate fields in your class).

Worth to mention the great framework xJSFL, which can really help you to write more compact and elegant scripts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top