title: Linking AS code to symbols defined in an external SWC?
body: <p>(apologies ahead of time, I only really know Flash; my Flex experience is basically nil. There may be a very standard and obvious workflow solution that Flex people know about)</p>
  
  <p>I have a number of UI elements that are graphically quite complex (they're not components, they're just Sprites). Since it takes a long time to compile them, I've been trying to move them into an external .swc. However, I want to associate some code with these classes, but I don't want to have to recompile the graphical assets every time I make a code change.</p>
  
  <p>At the moment I have it set up like this: UI elements are created in a separate FLA and exported to a SWC. In my primary FLA, I have actionscript classes that extend each of the graphical assets in the SWC. For example:</p>
  
  <pre><code>external.swc:
      (some symbol defined in the Library and exported for actionscript in frame 1)
      class: com.foo.WidgetGraphic
      base: flash.display.Sprite
  
  main.fla:
      Widget.as:
          package com.foo {
              public class Widget extends WidgetGraphic {
                  ...
              }
          }
  </code></pre>
  
  <p>This works, but is time-consuming and prone to error. I'd rather be able to avoid having to inherit from each graphical asset, and just define them directly. Is there a better way to do what I'm trying to accomplish?</p>
  
  <p>Note: the main concern here is compile time. I don't have any movies or audio or fonts, just a lot of vector art assets that appear to be slowing down my compilation time significantly. When I'm debugging I'm only making code changes, and would rather not have to keep recompiling the art...</p>