Jamie Foxx on Playing 'Electro' in 'Amazing Spider-Man 2'

When Jamie Foxx was cast as the villain in " The Amazing Spider-Man 2," it presented him with a unique opportunity.

"When I saw Andrew Garfield in his outfit, and me in my outfit, I was like 'wow, we get a chance to really live out our childhood dreams,'" he said.

Spider-Man's Emma Stone Becomes Real-Life Super Hero

Foxx, whose acting range has seen him in comedies and dramas - including his Oscar-winning turn in the biopic, "Ray" - is now taking on the role of the villainous Electro. But he's doing double-duty, too, as the mild-mannered Max Dillon, whose life is saved, and then changed, by Spider-Man.

For his role as Electro, Foxx, 46, said he spent 4.5 hours in the make-up chair "getting painted blue."

"It really helps with the character," he told "Good Morning America"'s Amy Robach. "Once you get the blue makeup on … it seems like the voice started to change. You started to feel it."

Get an Early Look at 'The Amazing Spider-Man 2'

Foxx said playing the bad guy was "kind of fun."

"You get a chance to color outside the lines," he said.

"The Amazing Spider-Man 2? opens nationwide today.