Ben Affleck and Tyler Perry bonded on the set of Gone Girl the old fashioned way – through sing-a-longs. Perry, who plays celebrity lawyer Tanner Bolt in the upcoming adaptation of Gillian Flynn’s 2012 best-seller, tells New York Magazine that Affleck had a tendency to burst into ’80s tunes in between takes. Impressed with his co-star’s encyclopedic song knowledge, Perry decided to put it to the test.

“One day, I was like, I’m just going to see how wild he can get. So I started singing [Bette Midler’s] ‘The Rose,’ and he could do it!” Perry reveals. How did director David Fincher, who runs a famously tight ship, react to his cast belting Bette? According to Perry, “he was singing along, too!”

[Related: Fall 2014 Movie Preview: The 32 Movies We’re Most Psyched to See]

Fincher’s adaptation of Gone Girl promises to be full of surprises – and Perry’s involvement got the ball rolling when he signed on. The entertainment mogul behind the Madea franchise rarely appears in films he doesn’t direct, write, or produce himself. When he agreed to play Gone Girl’s charismatic defense attorney,Perry wasn’t familiar with the film’s inspiration or its A-list director (whose films include The Social Network and Fight Club). “I probably would have walked away from it. If I had known who David Fincher was, and his body of work, or if I’d known the book was so popular, I would have said, No,” he admits. “And my agent knew that! He didn’t tell me until after I signed on!”

Though wary about playing a character from a beloved book, which he describes as “a lot of pressure,” Perry had fun making the film. In particular, he recalls a scene in which he had to lob gummy bears at Affleck’s head during multiple takes. (The jelly beans of the book were deemed “too hard” to throw at a movie star’s face.) “Listen – the man walks around with packs of Jolly Ranchers in his pockets,” Perry says of Affleck. “He loves them! So gummy bears – he’s a happy camper. I just made sure that as I was throwing them, it was off to the left, because I was worried about hitting him in the eye.”

As for perfectionist director Fincher, Perry says he was “always smiling” – except for one time when a crew member’s phone rang during filming. To preserve the on-set harmony, Perry stepped in.

“I could see (Fincher’s) eyes turning, and before he could say anything, I said it was my phone,” Perry says. “What’s he going to do? I’m bigger than him!”

Photo credit © WireImage/Getty Images

Watch the Gone Girl trailer below: