Ajax is a concept. Flash is a plug-in that most people have, which Adobe distributes (Formerly Macromedia Flash)
The two have virtually nothing in common.
Adobe Flex is used to make desktop/web applications. Although Flex is capable of doing just about anything Flash can do, Flash is more geared towards graphics/animations.
The future is probably pretty bleak for Flash. The price of the software rises every year, and the new versions of JavaFX and Microsoft Silverlight do almost the same thing, for free. Once all browsers are fully HTML 5 compliant, flash will begin it's journey of being completely obsolete.