Adobe SWC file

In this article, we will explore the topic of Adobe SWC file in depth, addressing its different aspects from a broad and detailed perspective. Over the next few lines, we will analyze in depth the importance and relevance of Adobe SWC file today, as well as its possible impacts in different areas of daily life. To do this, we will examine different points of view, studies and opinions of experts on the subject, with the aim of offering the reader a complete and enriching vision about Adobe SWC file. Throughout this journey, we will immerse ourselves in both its history and its current events, trying to understand its evolution over time and its influence on society.

ShockWave Component (SWC)
Filename extension
.swc
Internet media type
application/octet-stream
Magic numberPK\003\004
Developed byAdobe Systems
Type of formatClass Library
Container forXML SWF CSS
Extended fromZIP

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. SWC files can be generated by the Adobe Flash Professional authoring tool, and by Flash Builder (or its companion compiler MXMLC). 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. 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.

<?xml version="1.0" encoding="utf-8"?>
<swc xmlns="http://www.adobe.com/flash/swccatalog/9">
  <versions>
    <swc version="1.2" />
    <flash version="10.0" build="d566" platform="MAC" />
  </versions>
  <features>
    <feature-script-deps />
    <feature-files />
  </features>
  <libraries>
    <library path="library.swf">
      <script name="ButtonClickSound" mod="1275949831598" >
        <def id="ButtonClickSound" /> 
        <dep id="AS3" type="n" /> 
        <dep id="flash.media:Sound" type="i" /> 
      </script>
      <script name="EndGameSound" mod="1275949831598" >
        <def id="EndGameSound" /> 
        <dep id="AS3" type="n" /> 
        <dep id="flash.media:Sound" type="i" /> 
      </script>
    </library>
  </libraries>
  <files>
  </files>
</swc>

References

  1. ^ AdvancED Game Design with Flash, Apress, 01-Sep-2010
  2. ^ SWC-based Components, Adobe LiveDocs.
  3. ^ Flash CS3 For Dummies, John Wiley & Sons, 13-Aug-2007
  4. ^ Flash Builder and Flash Catalyst: The New Workflow, Apress, 20-May-2010