Where to install SWCs for Flash CS4

ComponentsSomething we use here is the Google Maps API for Flash, which is delivered as an SWC file. SWC files are ActionScript classes which have been pre-compiled into an SWF. The fact they are pre-compiled means you don’t have to re-compile them every time you export your application. Another benefit of  SWCs is that they enable you to deliver functionality while keeping your source code obfuscated to some degree. In their instructions, Google say you should install the SWC files here:

C:\Program Files\Adobe\Adobe Flash CS3\language\Configuration\Components

What if you’re using Flash CS4? Well, in this version of Flash the ActionScript 3.0 Settings dialogue has changed (both the publish settings version and the global preferences version). You can specify a “library path” – this may be any folder on your computer. This is supposed to be a repository for your SWC files; you can set this and drop an SWC in here.

This will allow you to access the classes compiled into the SWC, however the SWC does not show up in the Components panel in Flash. If you are working visually in the Flash IDE and would like it to do so, you will need to forget about the library path option and instead drop SWCs into this folder:

C:\Program Files\Adobe\Adobe Flash CS4\Common\Configuration\Components

Restart Flash and the component should be there.

Comments on this post

  1. Laxman says:

    Thanks you for the help.

Leave a Reply to Laxman Cancel reply

*