First of all, this is a very common problem that is rehashed several times all over the forum.
With that out of the way, here's the answer:
You installed it wrong.
You most likely didn't but the d3dx9_31.dll file in the game\bin folder. Either that, or something else is wrong with your install.
Use this:
http://www.modthesims.info/download.php?t=344611 to make sure you install the framework right. That is, if you're on a PC. If you're on a mac, I know there's a tutorial around here somewhere.
Also, once it does get installed correctly, expect it to crash to desktop at least once during loading. This is quite normal. All you have to do is keep trying to load it. It will load eventually.