2
votes

I am working on a Flash project. In the project there are lots of isolated FLA files which may share the same common classes code. To clarify the project limitation:

  1. I could ONLY use Flash CS6 IDE. No modern tool such as Flash Builder or Flex, just pure Flash CS6 IDE.
  2. I have to export the FLAs to SWFs one by one separately so each one of SWFs would contains a copy of the ABC of the common classes.
  3. I have a loader.swf which was going to load all the other SWFs into a same ApplicationDomain. In other words all the duplicated ABC in the SWFs would be ignored because the loader.swf has also already involved that.

And my questions are:

  1. Is there any way I could pre-compile all the common classes into a SWC or SWF and I could use it just like a DLL or SO?
  2. If so how could I create such a SWC or SWF only by Flash CS6 IDE as I told before?
  3. If I could create such a SWC or SWF how should I use it? Such as How could I change my configuration in the Flash CS6 IDE?

To be honest I don't know my idea is valid or not. Please, any advise would be great helpful.

Thanks.

1
you can create a SWC by selecting "Export SWC" in publish settingsuser1901867
Thanks, I got the SWC finally. But how should I use it as a dynamic sharing library?jayatubi
oh i see - if you need dynamic runtime loading, SWCs are no gooduser1901867
I want to use SWC as a static lib just like a .lib in c++ and use SWF as the real class provider just like the a .dll.jayatubi

1 Answers

0
votes

I found the solution:

  1. Create a FLA which would touch all the common classes
  2. Exrpot the FLA I would get two files: SWF and SWC
  3. Use the SWC as "External Library" in other FLAs
  4. Use the SWF as Run-time Sharing Library to dynamic load it at run-time