Adobe SWC file

{{About|the SWC file format||SWC (disambiguation){{!}}SWC}}

{{Infobox file format

| name = ShockWave Component (SWC)

| icon = Adobe-swc icon.png

| logo =

| screenshot =

| caption =

| extension = .swc

| mime = application/octet-stream

| type code =

| uniform type =

| magic = PK\003\004

| owner = Adobe Systems

| type = Class Library

| container for = XML SWF CSS

| contained by =

| extended from = ZIP

| extended to =

| standard =

}}

An SWC file is a package of precompiled Flash symbols and ActionScript code that allows a Flash or Flex developer to distribute classes and assets, or to avoid recompiling symbols and code that will not change.[https://books.google.com/books?id=Xsheyw3JJrMC&dq=swc+flash&pg=PR28 AdvancED Game Design with Flash], Apress, 01-Sep-2010[https://archive.today/20130117230045/http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000384.html SWC-based Components], Adobe LiveDocs. SWC files can be generated by the Adobe Flash Professional authoring tool, and by Flash Builder (or its companion compiler MXMLC).[https://books.google.com/books?id=0Lx5TGkh_48C&dq=swc+flash&pg=PA288 Flash CS3 For Dummies], John Wiley & Sons, 13-Aug-2007 They are sometimes referred to as class libraries and cannot be directly executed by the Flash Player.

SWC code libraries are typically included in an ActionScript 3 project, and compiled into the final SWF file alongside the developer's program, by the ActionScript 3 compiler. Only the classes that have been used by the project (and their dependencies) are transferred into the resulting SWF file.

Format

A SWC file is compressed by means of the ZIP archive format.[https://books.google.com/books?id=UPkwMJvG5dwC&dq=swc+flash&pg=PA77 Flash Builder and Flash Catalyst: The New Workflow], Apress, 20-May-2010 Renaming the extension of a SWC file to "zip" will allow any ZIP-compatible decompression software to show the contents of the file.

An uncompressed SWC file contains at least a catalog.xml file, and a SWF file, usually named "library.swf". It may also contain other files, such as CSS files. The catalog contains a list of the ActionScript classes contained in the library, their dependencies, and modification dates.

=Example catalog.xml=

This is a simple example of a catalog.xml for a SWC created in Flash CS4 which contains two sounds.

References

{{Reflist}}

{{Adobe Flash}}

Category:Adobe Flash