In addition to what other guys said, Flex Builder (now it is named Flash Builder), Flash IDE, FlashDevelop, FDT and other programs are just development environments that come with some additional perks. The output is the same - swf that is not different at the core no matter what environment you use.
Conceptually you can write code in a notepad, point swf compiler to it and you will get swf.
Although Flash IDE has improved over time as a development tool - it is not a match to more sophisticated environments like Flash Builder, FlashDevelop or FDT. Note that other than Flash IDE environments are based on programs that are used by developers in other languages like Java. For instance Flash Builder is based on Eclipse. This is telling because for many reasons Flash IDE cannot live up to what more robust platforms evolved into. Unlike other tools and frameworks it is very hard (sometimes simply impossible) to accommodate Flash IDE for industrial strength development. Deployment and version control are the major headaches in Flash IDE.
Flex is just a library that is developed on a top of AS3 the same as you build your own classes (this is statement is 95% true). Of course, as mentioned, there is an additional xml-based way to develop Flex application but at the end it all is translated into AS3 and compiled. So, Flex application in essence is just a Flash application (and word Flash here is used as a name of technology at large).
If you hesitate over what to accept as a main tool, you should remember that Flash IDE is a legacy tool that Adobe inherited from Macromedia. With introduction of Flex/Flash Builder Adobe clearly demonstrated a commitment to a more enterprise oriented technology. Latest Flash Builder version comes with an attempt to integrate Flash IDE into workflow. Basically, the only step left is to somehow slip timeline development environment into Flash Builder and let Flash IDE die. This is my personal opinion though.
In addition, Adobe is trying hard to integrate their products into one framework/suite so that graphics are developed where they are more native (Illustrator, PhotoShop, etc.) and export them into Flash format and programming tasks are accomplished in Flash Builder. This is called Adobe Catalyst.
I have a notion that Adobe is generally very eager to kill Flash IDE. The only thing that stops them is, perhaps, they don't want to piss off already agitated crowd of designers who are reluctant to embrace OOP.
The point is that in conjunction with the fact that Flash IDE is natively a very inconvenient tool to use for true OOP development, I would recommend to anyone to move away from Flash IDE toward something more sophisticated.
Granted, it is sometimes necessary to use timeline for creating graphics but with the advent of physics and 3D libraries - timeline starting to look more and more lame even for animations.
In my view there are practically no redeeming qualities in Flash IDE at this point.