4 Replies Latest reply on Jun 16, 2010 1:52 AM by Gregor.Kiddie

    SWC access problem

    miquael Level 1

      I'm new to using Flash Builder and SWCs (tho have used the Flash IDE for 12+ years), and am still getting a handle on setting up a Flex/Flash Builder project and incorporating SWCs.  Although I've already been thru several tutorials on setting up a project and incorporating SWCs, I have this problem: while I can see the contents of the SWC in the Package Explorer window, I'm not able to access the contents in the main view.  When I click on an item of the SWC, I get this error message:


      "Code Navigation Error


      Source code could not be found for com.client.subfolder.ClassExample in /Users/mac/projects/client/com/swc/projectframework.swc."


      What am I missing here?


      The SWC has been properly imported, I can see it in the Package Explorer window, and all of it's contents are listed ...


      Is it possible to access, view, and edit the source of the SWC?





      thanks ...

        • 1. Re: SWC access problem
          Jason San Jose Adobe Employee

          You have to associate the SWC with a source attachment since the SWC file format does not include source or a path to source. To do this, the SWC needs to be explicitly added to the library path:


          1) Project > Properties > Flex Library Build Path

          2) Add SWC...

          3) Click on the added SWC and select "Source attachment"

          4) Specify the path to the root source folder for the SWC


          Jason San Jose

          Software Engineer, Flash Builder

          1 person found this helpful
          • 2. Re: SWC access problem
            JeffryHouser Level 4

            Do you have the source for the SWC you're using?


            If your SWC is created as a library project in the same Flash Builder workspace, you should have no problem viewing the source of the code inside the SWC.


            If the source is in a different workspace, or you never made a project for it, you may have to specify the location.  Bring up the project preferences, go to Flex Build Path, and then Library Path.  Expand the SWC in the list and there should be an option for "src attachment".  Make sure it is pointed to the proper directory location of the source on your machine.


            If you just downloaded something off the Internet and do not have the source; you won't be able to review it.

            1 person found this helpful
            • 3. Re: SWC access problem
              miquael Level 1

              thanks for your help!


              yes, so it's true that the SWC exists inside a folder that is outside of the designated Work Space, and that the source path of the SWC was not set, and so i set it to the location of the folder that contains the SWC.  however, after this, i'm still not able to access / read the files.


              the SWC was derived from a client (which will be used in a client project), so i do not have the original source files that were used to create the SWC.  does this mean i cannot view the contents of the SWC unless i also get the original source files?


              by the way, all of the files listed in the SWC have a .abc file type (what's that?!).  visually, the listed SWC files look like gray versions of the .as file types, except they are .abc.  never even heard of of it (googled it, and i don't think the .abc file type would have anything to do with this project).  is this normal?




              • 4. Re: SWC access problem
                Gregor.Kiddie Level 2

                If you don't have the original source code, you cannot look at the files.


                .abc stands for Actionscript Byte Code. It's the compiled version of the classes ready to be interpreted by the Flash Player. They aren't fantastically human readable.


                So yes, this is normal.