I resisted the urge to title this post What the swc? 🙂
For some unknown reason Flash just stopped exporting swc files properly. FDT could no longer see what was inside them. FDT guru Alan Klement kindly offered to help me troubleshoot the problem and he discovered that the catalog.xml file inside had empty script tags.
I’ve heard anecdotal evidence from my friends Owen and Richard that exporting your .swc to the same folder as your .fla file can cause problems.
So I subsequently tried publishing the swc (and swf) to a different folder, and no swc would even appear! I also tried making a new fla and copying everything into it and this didn’t work either. Then I made a new fla and created a symbol, exported it for actionscript, set it to create a swc, and that broke too!
It’s such a weird thing. It basically killed most of my productivity yesterday. And the terrifying thing is that I don’t even really know how I fixed it.
I just came in this morning, and did everything with a new fla directory and a new swc directory, copied the assets into the library and it worked.
Anyone else had this?
16 replies on “Problems with .swc files”
Sounds like the problem I described 😉
If you have this happen, you have to delete *all* of the swfs and swcs in the folder with your fla and recompile to an external folder. I’m guessing there’s some kind of weird caching thing going on, but who knows?
exact same problem here this morning. Deleting all SWC and SWFs helped! Thanks for the hint. I came as far as “Works in a different directory.” but didn’t keep on figuring out how why…
I’ve had the same problem a few weeks ago, and after discussing it with Philippe Elsass (creator of flash develop for thoses who don’t know him) I’ve come to the same conclusion as you, export the swc to another directory…
I don’t know why sometimes it works, sometimes you just have to turn off your pc and go out for a day… ^^
I’ve encountered the problem of not being able to export a swc at all a few times before, and I found the problem to be self-references.
What I mean is that for example swc’s would be added in the library path, which contained references to classes specified in the export settings of some library symbols. Or a source folder is included which contains a class to which a library symbol is attached. Stuff like that.
Every time no swc would be compiled. It wouldn’t explain the corrupt swc exports I guess, but it might help.
Had the same issue yesterday – a .swc created by the Union guys simply won’t import in to CS3 for me, but can be added to the library in FlashDevelop with no problem. Weird!
what is the publish date of that SWC, is it updated when you export in Flash? If this is not the case, check if any related classes in A.swc are also linked in B.swc, re publish B and then A. The date should now be updated!
I use templates from http://www.***domain-name-removed***.org
then you do not have this problems
Mike, I’d appreciate it if you didn’t post irrelevant comments to blatantly promote your own template site.
Has same issue occur during a Game Jam. Found solution on the FlashDevelop forums and made a follow-up in a thread that occurred when yet another programmer hit this bug:
One of the worst head scratchers; I hope Adobe fixes this outstanding bug soon.
Wow Im glad I read this before having to solve it myself
Yup I’ve had that problem too. In fact I’ve had my fingers burnt so many times by swc’s that I try and avoid them at all costs. My favourite is the way they sometimes randomly strip all of the timeline actionscript from their assets – maybe this is connected to the empty script tags that Alan Klement found in your swc’s catalog.xml?
If possible, I’ll import or embed swfs instead. Bah.
i had the same problem. i just “outsourced” the swc production to my coworker. very un-nerdy solution – but did the job 😉
anyway thanks for the hints and links.
I just add the same problem, I did all the previous solutions that you guy’s wrote and nothing was successful.
I then tried to add some code on the timeline on the firstframe, a simple stop(), and boom!!! worked on first try…
Try it !
Just encountered the same issue (I’ve been in Flash since v4 and this was a new one to me). The solution posted by robg1976 worked for me.
Thank you so much for this!! I’ve been pulling my hair out for the past 2 days trying to figure out what happened. Deleting all the .swc and .swf files, then recompiling to another directory did the trick for me.
Tried all the suggestions, still nothing seems to be working. SWC just won’t publish 🙁