Scattering Amplitudes In Flat Space And Anti-De Sitter Space