0

I have an asset FLA file that includes symbol assets.UI.something and there is a corresponding class assets/UI/something.as. When I'm publishing it into SWC, I can unzip it and see (in catalog.xml) that the symbol is there.

I also have a main file that has my asset SWC included in publish settings (merged into code). But when I run it I can see that the symbol isn't included in the final SWF.

I've tried many ways and eventually I've discovered that if I remove the AS class file (assets/UI/something.as) after I make SWC but before I compile the final SWF, then the symbol gets included in SWF...

Any ideas why it is happening and how to fix it?

Thanks!

xims
  • 1,570
  • 17
  • 22

2 Answers2

0

Maybe you need to change linkege method: File -> Publish settings -> actionscript settings Change Default linkage to merged into code and try

Azzy Elvul
  • 1,403
  • 1
  • 12
  • 22
0

Seems like your symbols are overridden with class files that your compiler sees when compiling your application. So when you compile your swc everything works fine and all the assets are there, but when you compile your application there are other versions of all the same classes you had when you compiled the swc, but now there are no assets from FLA linked to them. Just move all SWC related stuff (fla and all the as files) outside of your application source path.

borisgolovnev
  • 1,780
  • 16
  • 20
  • Yes, that's exactly what seems to be happening, even that it's the same version of same classes. But it just doesn't make sense - it's the same project with many shared classes, shared configuration, etc. Thanks for your answer! – xims Jan 22 '13 at 22:26
  • I am having what seems like the same problem. I was wandering how did you fix this? – Justin Jan 23 '13 at 00:24
  • Justin - I didn't find a solution yet, except removing the class file before compiling. It's not really a solution, more like an ugly workaround... Hoping to find a better way. – xims Jan 23 '13 at 01:24
  • I thought it was a feature actually. Sometimes it is useful to override a class from a SWC with your own version and you can do just that by providing your own .as file. The problem here is that compiler can't access the assets you have in your FLA, just the class itself. So the solution would be not having any assets-related classes in application source path. I believe you still can share classes between assets lib and your app by including application src in your assets lib source path. – borisgolovnev Jan 23 '13 at 06:18