In order to access Adobe Flex or Adobe AIR APIs from HaXe, you need the externs classes.
These classes contain variables and methods signatures and ensure compile-time type checking (and completion...). They won't be compiled inside the SWF.
Then, you have to provide the used classes inside an extern SWF library (Flex components built inside SWF Library for example), or execute the application in the right flash player (AIR runtime for example).
If you attempt to use an object (class, function ...) that is not in the SWF library or is not native in the target flash player (AIR flash.filesystem API inside browser flash player), you'll get run-time exceptions.
You can download the ZIP that contains all the classes found in the Flex 3 SDK (excluding some standard libraries that are in the haxe std directory) here.

Read next