Flash CS3 Documentation |
|||
| Using ActionScript 2.0 Components > Creating Components > Exporting and distributing a component > Understanding SWC files | |||
A SWC file is a zip-like file (packaged and expanded by means of the PKZIP archive format) generated by the Flash authoring tool.
The following table describes the contents of a SWC file:
|
File |
Description |
|---|---|
|
catalog.xml |
(Required) Lists the contents of the component package and its individual components, and serves as a directory to the other files in the SWC file. |
|
ActionScript (AS) files |
If you create the component with Flash, the source code is one or more ActionScript files that contain a class declaration for the component. The compiler uses the source code for type checking when a component is extended. The AS file is not compiled by the authoring tool because the compiled bytecode is already in the implementing SWF file. The source code may contain intrinsic class definitions that contain no function bodies and are provided purely for type checking. |
|
SWF files |
(Required) SWF files that implement the components. One or more components can be defined in a single SWF file. If the component is created with Flash 8 and later, only one component is exported per SWF file. |
|
Live Preview SWF files |
(Optional) If specified, these SWF files are used for live preview in the authoring tool. If omitted, the SWF files that implement the component are used for live preview instead. The Live Preview SWF file can be omitted in nearly all cases; it should be included only if the component's appearance depends on dynamic data (for example, a text field that shows the result of a web service call). |
|
SWD file |
(Optional) A SWD file corresponding to the implementing SWF file that allows you to debug the SWF file. The filename is always the same as that of the SWF file, but with the extension.swd. |
|
PNG file |
(Optional) A PNG file containing the 18 x 18, 8-bit-per-pixel icon that you use to display a component icon in the authoring tool user interfaces. If no icon is supplied, a default icon is displayed. (See Adding an icon.) |
|
Property inspector SWF file |
(Optional) A SWF file that you use as a custom Property inspector in the authoring tool. If you omit this file, the default Property inspector is displayed to the user. |
You can optionally include other files in the SWC file, after you generate it from the Flash environment. For example, you might want to include a Read Me file, or the FLA file if you want users to have access to the component's source code. To add additional files, use the Adobe Extension Manager (see www.adobe.com/exchange/em_download/).
SWC files are expanded into a single directory, therefore each component must have a unique file name to prevent conflicts.
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00002522.html