Her first role was as an orphan taken in by a hitman in the 1994 action film , but mainstream success came when she was cast as Padmé Amidala in the Star Wars prequel trilogy (released in 1999, 2002 and 2005).