Jan 17 2010

How to use SWC

Category: FAQadmin @ 7:08 pm

What is SWC?

SWC is a file containing ActionScript source codes in a compiled status. The good thing about a SWC file is that it will help your projects compile faster because your compiler (flash CS4 for example) doesn’t have to compile everything from scratch any more.

In simple words, you use SWC files to access class packages instead of accessing the class .as files manually. This is how flash and flex source codes are orgenized also. There might be other good things about SWC also but that’s what I know about, feel free to let me know if there’s anything else :)

How to use SWC in Flash CS4?

 If you have an SWC and you are trying to use that in your CS4 project, go to “properties” panel and click on the edit button next to your profile.

click to enlarge

This will open the “Publish Settings” window. in this window, click on “settings…”.

click to enlarge

 Another window will open, go to Tab “Library Path” and click on the SWC icon to select an indivisual SWC file or you can put all your SWC files in one place and instead of clicking on the SWC icon, you may click on the folder icon just next to it and browse to the folder where you have all your swc files stored in it.

click to enlarge

click ok and close the windows and save your project. now you will be able to import the classes being used in the swc file and run your project.

How to use SWC in Flash CS3?

Copy the SWC file to where you have you’re CS3 installed. somewhere like “C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Components” and restart your CS3. Then open your component window, “Ctrl+F7″ and drag the added component into your library panel.

click to enlarge

click to enlarge

Then you should be able to run the classes with no problem.

How to use SWC in FlashDevelop?

FlashDevelop is my favorite flash compiler, and I feel proud to recommand that to any other AS3 coder! so, if you are using FlashDevelop, read this post to see how you can use SWC classes.

http://www.flashdevelop.org/community/viewtopic.php?t=1061

Best Regards,
Hadi

Tags: , , ,

4 Responses to “How to use SWC”

  1. miguel says:

    Thanks, it served me a lot

  2. ana says:

    Thanks a lot, I’ve been googling for a while.

  3. Bakht says:

    Thanks

Leave a Reply

*