what is SWC, when/where we use SWC in Flash

Does any one know what is SWC and where we use this SWC in Flash Development?

Answers


SWC files make it easy to exchange components and other assets among Flex developers. You need only exchange a single file, rather than the MXML or ActionScript files and images and other resource files. The SWF file in a SWC file is compiled, which means that the code is loaded efficiently and it is hidden from casual view.

.

You can also dynamically link the contents of SWC files. Dynamic linking is when the entire SWF file is loaded at run time. To achieve dynamic linking of the SWF file, you must use the SWC file as a Runtime Shared Library, or RSL.

http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_30.html


So you know how in AS3 you can import classes by typing in the package name? flash.display.MovieClip, etc?

A .swc basically lets you create a single file that holds a bunch of packages, but also includes any visual DisplayObjects that are associated with those packages. So lets say, for instance, that I have an .fla with 30 images which I want to associate to classes that I can use in other .flas.

Normally with an .fla you would compile to a .swf file, but you also have the option to compile to a .swc. You can set up your file to create something like myPath.images.Image1, myPath.images.Image2, etc. Then you compile to a .swc and put it in the .swc path of any other project. In that project, then, you can just type "import myPath.images.Image1" and you'll automatically have a class that you can instantiate and drop on the stage and boom, you have your image.

It's super useful if you want to:

  • easily link up images to code and store that in a small package
  • create code that other people can use but can't necessarily look at
  • Export both code and graphics from Flash into FlexBuilder, which lacks the graphics/animation tools that flash has.

Make sense?


Need Your Help

bash Command Substitution with Spaces Issue

bash shell variables substitution

I'm trying to populate some exclusions to run a backup script on the command line by reading the values from an external file and prefixing these with -x. There will be a variable number of exclusi...

Ajax Request monitoring flow

javascript ajax jquery javascript-events

I have an AJAX Request in a javascript script where i GET a file like that:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.