The other day I stumbled across Flixel, a brilliant collection of ActionScript3 classes for building Flash games. Flixel is a pure ActionScript library, meaning it’s intended for use without the Flash IDE. It’s mind-bogglingly new, but has a nascent community that’s growing larger by the day. Most tutorials and things I’ve found for Flixel tend to be focused on Windows development though, using either FlashDevelop or FlexBuilder. I couldn’t find a guide to getting started with Flixel development on OS X, so I thought I’d put on my tutoring hat and write one myself — this post (and posts to follow) should get you started developing Flixel-based games on OS X, using nothing but the free Flex SDK and a text editor.
open ~/.profile. This opens up your bash profile in TextEdit; add this line to the end of the file:
export PATH=~/Library/flex_sdl_3.4/bin:PATH(if you put the flex_sdk_3.4 folder somewhere other than ~/Library, use that path here instead). Save the file and quit TextEdit
source ~/.profile, either works), and make sure everything works by typing
mxmlc -help. You should get a screenful of text, starting with the line “Adobe Flex Compiler (mxmlc).” Success!
mxmlc Mode.as. You should see something like:
Loading configuration file /Users/doches/Library/flex_sdk_3.4/frameworks/flex-config.xml /Users/
/Downloads/flixel_v1.25/Mode.swf (380608 bytes)
open Mode.swfin Terminal).
Ok — that’s everything we need to build Flash games using Flixel. I'd write a bit more about actually using the library, but that's definitely been taken care of by other, more talented, folks than I...