Unfortunately you can't. The way I usually get around this is to have the planets I don't want to build anything (In your case 2 planets) build the longest possible project.
For example, say you want to build a scout ship on your first planet only, and nothing on the other 2. Set planet one to build scout ships (say 5 months to complete) and planets 2 and 3 to build constructors (say 15 months to build). By the time the scout ship is completed you still have 10 months left before the constructors are finished. Now you can either choose to cut military spending to zero, or reassign planets 2 and 3 to build a different military project. But here's the kicker...the time (and hence, the money) you invested in building the constructors is not lost if you choose to switch to building say freighters. How ever far along you are percentage wise to completing a specific military project, some of this amount carries over to a new project. It varies depending on what your initial build orders were before you switched the incomplete project, and also varies depending on WHAT you want to switch it to. Experiment with this a little next time you are close to completing a military project, and you'll see what I'm talking about (Just don't forget to switch it back to whatever you wanted to build in the first place!)
Contrary to military building, social building is "stored".
For example: If you have 9 months left on you Diplomatic Translator build on Earth, but morale is dropping too quickly, you can switch you social build over to stadium to bring up the morale. When the stadium is built if you go back to finish the Diplomatic Translator, you'll see that it still takes only 9 months more to complete. (this only applies to the SAME planet the original build was occuring on).
Hope this helps, and any other questions...ask away!