Credit: Sean Gallup/Getty Images; Florian Seefried/Getty Images

Rosie's a jokester!

Rosie Huntington-Whiteley knows all about Shia LaBeouf and Megan Fox's talked-about hookups on the set of the second Transformer flick -- and, as Fox's replacement for Transformers: Dark of the Moon, she steeled herself to resist his advances!

"It was tough," the stunning British model-turned-actress, 24, joked during an appearance on Chelsea Lately. "I really had to tie myself into my trailer!"

LaBeouf, 25, kissed and told in a recent Details interview about hooking up with Fox, 25. "Look, you're on the set for six months, with someone who's rooting to be attracted to you, and you're rooting to be attracted to them."

"I really had to restrain myself," Huntington-Whiteley yukked when asked about avoiding LaBeouf during the flick's seven month shoot. "It was really tough for me. I had to wear a chastity belt!"

In all seriousness, the stunner has been dating The Mechanic hunk Jason Statham for over a year. She added that Statham, 43, doesn't mind when she towers over him in heels. "He loves it!"