Skip to content

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Indexes
  • 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

Retweet on TwitterJohn Winkelman Retweeted
swordsjewTalia Lavin@swordsjew·
16h

republicans: we openly want a tyranny of the white minority and will enact violence to cement it, we've been consolidating power for decades

democrats: we believe that anyone who runs a small business in a disadvantaged neighborhood for 5 years deserves a tax cut on baby formula

Reply on Twitter 1527340504094232576Retweet on Twitter 1527340504094232576861Like on Twitter 15273405040942325764676Twitter 1527340504094232576
Retweet on TwitterJohn Winkelman Retweeted
SenDuckworthTammy Duckworth@SenDuckworth·
8h

Every Senate Republican—the majority of whom don't have uteruses themselves—voted against protecting Roe v. Wade and your right to decide what happens to your own body.

Reply on Twitter 1527469474038808580Retweet on Twitter 1527469474038808580203Like on Twitter 1527469474038808580887Twitter 1527469474038808580
JohnWinkelmanJohn Winkelman@JohnWinkelman·
11h

Marked as to-read: Dream or Nightmare by Stephen Duncombe https://goodreads.com/review/show/4733884194

Reply on Twitter 1527421442752712706Retweet on Twitter 1527421442752712706Like on Twitter 1527421442752712706Twitter 1527421442752712706
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

© 2022 Ecce Signum

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