Creating .as class in Flash Builder for movieclip stored in SWC

326 Views Asked by At

I need to use movieclips created in Flash Professional CC in my Flash Builder project. I have exported my .fla file as an .swc and included it in my Flash Builder project. The movieclips for which I DON'T need a custom .as class import without a problem. But the movieclips that need to be linked to an .as class don't appear. I have tried the following, using my ThoughtBubble movieclip as an example:

1) Giving the .fla with the ThoughtBubble movieclip access to ThoughtBubble.as so that the movieclip doesn't create a dummy ThoughtBubble.as file.

2) Denying the .fla access to ThoughtBubble.as so that the movieclip is forced to create a dummy ThoughtBubble.as class.

Either way, the ThoughtBubble movieclip does not appear in the list of movieclips in my swc when imported into my Flash Builder project.

3) I also tried removing my ThoughtBubble.as file from my FlashBuilder project and THEN importing the swc. The ThoughtBubble movieclip does show up in the list of swc assets--BUT when I try to create a ThoughtBubble.as file, I get the following error: "ThoughtBubble.swc already exists."

What am I doing wrong? How can I link my ThoughtBubble movieclip with ThoughtBubble.as in Flash Builder?

Thanks in advance!

EDIT: Here is a screenshot of my fla publish settings (stackoverflow isn't letting me include an image directly, so here's a link): http://i1332.photobucket.com/albums/w606/Palladian1881/publishsettings_zpsbac6ee3f.png

And a screenshot of my ThoughtBubble movieclip properties: http://i1332.photobucket.com/albums/w606/Palladian1881/symbolproperties_zpsd0aaf9b5.png

1

There are 1 best solutions below

0
On

You need to avoid the circular dependency with your libraries. Use two separate projects in flashbuilder to achieve this.

  1. ThoughtBubbleLib - an "actionscript library project" for the library code required in the fla. ThoughtBubble.as lives in this project, and you link to it in the fla file.
  2. TheProject - another project which links to both ThoughtBubbleLib , and the swc exported by the flash IDE (ThoughtBubble.swc)

make sure you build everything in the correct order.

  1. compile ThoughtBubbleLib in flashbuilder
  2. compile ThoughtBubble.swc with flash
  3. compile 'TheProject' in flash bubble with the newly-built dependencies