What can I do to help prevent flatulence from beans?
In fact, soaking helps reduce the flatulence-causing sugars and starches. See this answer, for example. Soaking alone won't completely neutralize the problem, though. Certain spices may help; according to Wikipedia: 


  Many herbal substances have been observered since antiquity for reducing flatulence, particularly gas from eating legumes. Cloves, cinnamon, and garlic are potent in reducing gas. The potency of garlic increases when heated, whereas the potency of cinnamon decreases. Other spices have a smaller effect in reducing gas, including turmeric, black pepper, asafoetida and ginger. 


Another possibility is to take an enzyme supplement like beano to break down the starches before they get to the large intestine. See Wikipedia for more info.