1 Reply Latest reply: Dec 17, 2014 12:48 AM by asdasdsdasdasdasdasdasd RSS

    Flash builder doesn't reflect changes made to SWC files, how do I fix this?

    casualpenguin

      This is a very old problem that has become unbearable so I'm hoping someone out there has a solution:

       

      I use SWCs I have generated in Adobe Flash Professional in my Flash Build projects.  The problem is when these are updated flash builder absolutely refuses to recognize the changes to them.

       

      I have tried "refresh", "clean project" I've restarted flash builder, and it still shows and runs with the old content.  I verified that the swc file itself has the new content in it, the error 100% lies within Flash Builder.

       

      Edit: This is very far from an acceptable solution but for posterity's sake: The only way to get your code to recognize the changes is to go to: 'Project Settings' -> 'ActionScript Build Path' -> 'Library Path' then remove the changed SWCs close out these menus, then navigate back to there and readd them.  Sometimes this doesn't even work and you must also restart Flash Builder

        • 1. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
          phonefusionryan Community Member

          I definitely feel your pain... how I wish there was a holy grail "refresh for real" button...

           

          There are 2 ways i've found that work.

           

          1 - In the package explorer, right click your "libs" folder and hit refresh... somehow this is better than a normal "refresh"

           

          2- Right click your project > Properties > Flex Build Path >click the little drop down arrow on the "libs" folder > Double click the "Link Type:Merged into code" > Hit ok without doing anything > Hit Ok to close the window..... Somehow this works and you don't necessarily have to re-add your swcs.

          • 2. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
            Nabren Community Member

            I have also noticed this problem. However, restarting Flash Builder and then doing a "Clean Project" has always worked for me. But you have to restart Flash Builder before doing the clean. I would definitely prefer Flash Builder to not cache .swc files even if it does take longer to build.

             

            I scoured Flash Builder for some kind of cache option I could turn off with no luck.

             

            EDIT:

             

            This problem also exists with .swf files and the [Embed] tag.

            • 3. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
              casualpenguin Community Member

              I put this out there not expecting to ever get any replies so thank you very much for commenting.

               

              The solution of 'dirtying' the link type is what I have been doing, I randomly stumbled across this I don't know how, but it's the least interruptive solution I've found.

               

              I still wish Adobe would comment on how to simply disable to swc caching... It is only a hindrance for me since I began doing more complicated projects :/

              • 4. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
                casualpenguin Community Member

                I put this out there not expecting to ever get any replies so thank you very much for coming by to help.

                 

                As phonfusionryan mentioned, the least invasive method to force it to refresh that I've found is to 'dirty' the link type by opening the link type panel in the build path.

                 

                I've also scoured for a solution and since I am on the verge of spending more money on flash builder I was really hoping to make myself feel better by seeing that there is a solution to this but I guess there hasn't been one yet :/

                • 5. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
                  aboutveniceY Community Member

                  This way is better than re-open the whole Flashbuilder!!  Solve the refresh SWC problem


                  Q:how to use FLA doing visual elements and publish SWC for flashbuilder to use?


                  A:
                  1.open an FLA for doing visual.

                   

                  2.open flashbuilder->File->flash professional project,and link the visual FLA file. (FB will generate a class file,ex:Main.as)

                   

                  3.in Flash IDE properties panel,type the class name as the same as in FB(ex:Main),then click "edit class definition",choice flashbuilder to open. (It will bring you to the flash builder class you create on step2.)

                   

                  4.test Main as in flashbuilder can really control the FLA.

                   

                  5.doing the visual in FLA and set publishing setting for SWC.

                   

                  6.now here,open your project for really working in flash builder now ,and set project properties->Actionscript build path->Library path,to like the visual SWC

                   

                  7.every time when visual is modified,republishing the SWC,and go to flashbuilder->project->clean,then the SWC should refresh successfully. (or you can re-new the instance you called from the SWC)

                  • 6. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
                    sstark1982

                    It's over a year later and this is still happening. This is very counter productive, we spent a day and a half troubleshooting this issue before realizing it was Flash Builder itself that caused the problem. ( We are working with Embedded symbols from .swf files )

                     

                    In order to resolve the conflicts, I must do this:

                     

                    * run clean

                    * build

                    * close flash builder

                    * open flash builder

                    * run clean

                    * build

                     

                     

                    That cycle is required any time the swf has been modified.

                     

                    This is very annoying and slowing down production a lot.

                     

                    Please Fix!

                     

                     

                    • 7. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
                      phonefusionryan Community Member

                      It's over a year later + because they haven't push out any updates for Flash Builder 4.7 in years. Though honestly I refresh my project hundreds of times a day and I NEVER have to do it the way you mentioned. Check out my post above for an easier way. This way has worked on every single computer I've used on Flash Builder Mac and Windows.

                       

                      EDIT... somehow just assumed you were using a swc... not sure about the swf method as obviously you can't do what I mentioned.

                      • 8. Re: Flash builder doesn't reflect changes made to SWC files, how do I fix this?
                        asdasdsdasdasdasdasdasd Community Member

                        There are two main annoying problems with Flash Builder and swc's:

                         

                        1.  Flash Builder doesn't reflect changes made to swc files

                        Solution : First of all - keep your swc files inside your project folder, you can also disable global swc cache: change as3api.cpp code,refresh swc in flashBuilder bug!

                         

                        2. Flash Builder breakes content inside swc files (and also popular problem "TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@1f21adc1 to...")

                        Solution : locate the project .actionScriptProperties file and set useFlashSDK=”false” :  Flash Builder 4.7 – useFlashSDK | In Flagrante Delicto!


                        In this case you can also download latest Apache Flex SDK to target new Flash player versions: http://flex.apache.org/

                         

                        Hope this helps!

                        P.