Ruby on Rails, Io, Lisp, JavaScript, Dynamic Languages, Prototype-based programming and more...

Technoblog reader special: $10 off web hosting by FatCow!

Monday, November 10, 2008

Compiling SWFUpload on Mac OS X

SWFUpload is a great flash library for dynamic file upload progress meters, but making changes to the swf can be a pain in the ass if you don't have FlashDevelop, a windows-only app for compiling actionscript. Luckily I figured out how to do it on OS X.

First download flex sdk 3 from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3

Next download SWFUpload from http://code.google.com/p/swfupload/downloads/list

Now cd into the SWFUpload v2.x.x Core/Flash directory.

Modify the file obj/SWFUpload-v2Config.xml to change the windows paths. Here is what mine looks like:

<!--Flex compiler config for project SWFUpload-v2 generated by FDBuild-->
<!--This file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<source-path append="true">
<path-element>/Users/lcarlson/SWFUpload v2.2.0 Core/Flash</path-element>
<path-element>/Users/lcarlson/SWFUpload v2.2.0 Core/Flash/SWFUpload.as</path-element>

Finally, all you have to do is this:

~/Downloads/flex_sdk_3/bin/amxmlc -load-config+=obj/SWFUpload-v2Config.xml -debug=true -incremental=true -benchmark=false -o swfupload.swf

Now you have compiled a new swfupload.swf. Woot.

You should follow me on twitter here.

Technoblog reader special: click here to get $10 off web hosting by FatCow!


If you like this blog, you might also like top photography schools.