Skip to content
Ecce Signum

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Laboratory

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 a diner in San Francisco

Archives

Categories

Posts By Month

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

Twitter Feed

JohnWinkelmanJohn Winkelman@JohnWinkelman·
9 Apr

Yeah, that would have been a totally different movie.

Alex de Campi@alexdecampi

Clockwork Orange, hat test, 1971

Reply on Twitter 1380494051548487681Retweet on Twitter 1380494051548487681Like on Twitter 1380494051548487681Twitter 1380494051548487681
JohnWinkelmanJohn Winkelman@JohnWinkelman·
9 Apr

5 of 5 stars to How to Be an Antiracist by Ibram X. Kendi https://www.goodreads.com/review/show?id=3914846425

Reply on Twitter 1380333038945591296Retweet on Twitter 1380333038945591296Like on Twitter 1380333038945591296Twitter 1380333038945591296
JohnWinkelmanJohn Winkelman@JohnWinkelman·
5 Apr

4 of 5 stars to How to Dress a Fish by Abigail Chabitnoy https://www.goodreads.com/review/show?id=3922597309

Reply on Twitter 1379031329006833664Retweet on Twitter 1379031329006833664Like on Twitter 13790313290068336641Twitter 1379031329006833664
Load More...

Links of Note

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

Watching, Listening
WYCE Electric Poetry
Writing Excuses Podcast
Our Opinions Are Correct

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

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

© 2021 Ecce Signum

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