Java-based Compiler API
Flex 3 includes a Java-based compiler API that lets you compile SWF and SWC files from Java applications. The API supports all the same options as the mxmlc and compc command-line tools. The API includes classes like Application, Logger, and Project
more info: http://blogs.adobe.com/flexdoc/oem/oem_guide.pdf