コンパイル時の切り替え
コンパイルオプションでどのコードブロックを使うか指定できます。
Using conditional compilation
http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html
これを応用してFlexとAIRを同じソースで管理しようというもの。
Common code in a library project
http://anirudhs.chaosnet.org/blog/2008.08.25.html
Building Flex and Adobe AIR applications from the same code base
http://www.adobe.com/devnet/air/flex/articles/flex_air_codebase.html