It seems like any inaccurate portrayal of somebodies life would be slander. How do people get around this? If I wanted to make a movie about Barrack Obama and say he was apart of terrorists groups would that be legal? Isn't this the reason movies have to say "Any characters in this movie were purely fictional etc."
No...in America, the standard to prove defamation against a public figure is very high: the plaintiff has to prove actual malice (http://en.wikipedia.org/wiki/Actual_malice) was used in publication. I imagine the standard for a movie, which besides using the "based on real events" disclaimer, has the additional benefit of artistic license on its side.