Packagecom.desuade.utils
Classpublic class SWCFile
InheritanceSWCFile Inheritance Object

Language Version : ActionScript 3
Since : 19.11.2009
Runtime Versions : AIR 1.0, Flash Player 9.0.0

Loads and represents a SWC file in AS3, providing access to it's classes and resources.



Public Properties
 PropertyDefined By
  catalog : XML
This is the XML of the catalog.xml file in the SWC
SWCFile
  classes : Object
This is an object containing all the classes found in the SWC
SWCFile
  dom : ApplicationDomain
This is the ApplicationDomain info from the library.swf
SWCFile
  libraryMC : MovieClip
The actual MovieClip from the library.swf file
SWCFile
  libraryMCData : ByteArray
Raw data of the SWF
SWCFile
  onLoad : Function
Method to be called after the SWC file is loaded
SWCFile
  sc : Object
This is an object containing the classes, but by the shorthand name.
SWCFile
  shared : Boolean = true
If the loaded SWC files should share their Classes or keep them in their own ApplicationDomain
SWCFile
Public Methods
 MethodDefined By
  
SWCFile is an object that represents information and data from a loaded SWC file.
SWCFile
  
getClass(className:String):Class
This returns the direct Class from the passed string
SWCFile
  
load(swc:String, shared:Boolean = true):void
This loads the specified SWC file.
SWCFile
  
loadData(data:IDataInput, shared:Boolean = true):void
This will load the SWC from an IDataInput source
SWCFile
Property Detail
catalogproperty
public var catalog:XML

This is the XML of the catalog.xml file in the SWC

classesproperty 
public var classes:Object

This is an object containing all the classes found in the SWC

domproperty 
public var dom:ApplicationDomain

This is the ApplicationDomain info from the library.swf

libraryMCproperty 
public var libraryMC:MovieClip

The actual MovieClip from the library.swf file

libraryMCDataproperty 
public var libraryMCData:ByteArray

Raw data of the SWF

onLoadproperty 
public var onLoad:Function

Method to be called after the SWC file is loaded

scproperty 
public var sc:Object

This is an object containing the classes, but by the shorthand name. If there are conflicts with multiple classes using the same name, they will be overritten.

sharedproperty 
public var shared:Boolean = true

If the loaded SWC files should share their Classes or keep them in their own ApplicationDomain

Constructor Detail
SWCFile()Constructor
public function SWCFile()

SWCFile is an object that represents information and data from a loaded SWC file. It provides a simple way to call resources from the SWC file.

Method Detail
getClass()method
public function getClass(className:String):Class

This returns the direct Class from the passed string

Parameters

className:String — The name of the class to get

Returns
Class — The Class, or null if it's not found
load()method 
public function load(swc:String, shared:Boolean = true):void

This loads the specified SWC file.

Parameters

swc:String — A string to the location of the SWC file
 
shared:Boolean (default = true) — This determines if the loaded classes will be shared or stay in their ApplicationDomain.

loadData()method 
public function loadData(data:IDataInput, shared:Boolean = true):void

This will load the SWC from an IDataInput source

Parameters

data:IDataInput — The data to load the SWC from
 
shared:Boolean (default = true) — This determines if the loaded classes will be shared or stay in their ApplicationDomain.