0
votes

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
Is your as file in the same folder as the fla file? You may need to link them in the publish settings. - Karmacon
I tried having them in the same folder (#1 in the list above) and different folders (#2). I'm looking at the publish settings of my fla--what do I need to do to link them? - Palladian1881
Are you trying to link the as file in FlashBuilder after the swc has already been exported?? Why not just link the as file in Flash CC? - Karmacon
Yes, I was trying to link it after the swc had been exported. What do I need to do to link it in Flash CC? In the movieclip's properties window, I have "export for actionscript" checked, and when I click the edit button to the right of the class name, it opens the correct .as file. Is there something else I need to do? - Palladian1881
No, that should be it. The as file is already linked. If the as file is not i the same folder as the fla, then you should go into the publish settings, and click the little wrench icon next to Actionscript 3.0. Then in the library path tab, locate your folder with your as files. When you import your swc into Flashbuilder, you do not need to reapply the as file. It should already be linked to the Class. - Karmacon

1 Answers

0
votes

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