Export to HTML5 from Flash Professional 14 years ago
Flex is a different beast (to my knowledge). Adobe would have to somehow support the huge library that Flex already has. A reason why not all components of AS2/AS3 are not supported.
Flash CS5 uses the new XFL file format, which are essentially zip files. The DOM document is then just parsed through and converted into their counter parts.