Skip to content

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Indexes
  • Laboratory
  • Notebooks
  • RSS Feed

Using .SWC files with the Flex SDK Command Line Compiler

2010-01-11 John Winkelman

If you are not a nerd, you might want to skip this post. It involves a specific technique for a specific Flash programming and development issue.

Still reading? Okay.

When programming in Actionscript, I use Notepad++ and the Flex SDK command-line compiler. The closer I can get to pure code – or rather, the farther I can get from using a Flash-specific IDE – the better. Unfortunately, there is one big hurdle to overcome when using this work method, and that is the inclusion of .swc files in my projects. A lot of useful libraries (e.g. Google Maps for Flash) come bundled as .swc files, and frankly, unless you want to pull a library apart and play with it, having everything compiled together in one file is pretty convenient.

All of the tutorials and documentation for the libraries contained within the .swc files assume you are using either the Flash IDE or Flash Develop. Nothing wrong with that; it is a fairly safe assumption which covers ~90% of the developers out there. Not so good for me, though.

So it was with unrestrained joy that I found an answer to my dilemma which gave me the best of both worlds. This is a simple extension to the tutorial put together by Senocular a couple of years ago, for those of us who refuse to be locked to a single development environment. The supa-smart Sakri found a way to add the libraries at compile time, without having to do any funky coding, or dealing with less-than-perfect developer tools. The complete instructions (assuming you have downloaded and installed the Flex SDK) are as follows:

0) Open the command prompt
1) drag&drop mxml.exe (or shortcut icon) into the command line
2) hit [space]
3) drag&drop your .as file into the command prompt
4) hit [space]
5) type in: “-compiler.include-libraries” without the quotes
6) hit [space]
7) drag&drop the swc you want to use into the command prompt
8) hit enter

If your code has no errors, then this should create a .swf file in the same directory as the .as file you dragged onto the command prompt. Best of luck!

Posted in ProgrammingTagged Flash

Post navigation

Times are Tough for Everyone
I Would Call That a Successful Project

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Personal website of
John Winkelman

John Winkelman in closeup

Archives

Categories

Posts By Month

January 2010
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« Dec   Mar »

Links of Note

Reading, Writing
Tor.com
Locus Online
The Believer
File 770
IWSG

Watching, Listening
Writing Excuses Podcast
Our Opinions Are Correct
The Naropa Poetics Audio Archive

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2025 Ecce Signum

Proudly powered by WordPress | Theme: x-blog by wpthemespace.com