Amber Heard's private conversations with Elon Musk and James Franco were revealed as part of her ongoing legal battle with ex-husband Johnny Depp.

According to Deadline, the 34-year-old actress took the stand in court on Tuesday (July 21) where she denied having affairs with Franco and Musk while she was still in a relationship with the Pirates of the Caribbean star.

Depp's lawyers attempted to prove her wrong by reportedly first reading out text messages from May 22, 2016, in which Musk offered to provide Heard with "24/7 security" the day after Depp allegedly threw a phone at her face.

"The offer would stand, even if you never wanted to see me again... anyway, sorry for being an idiot. The radio silence hurts a lot. It only matters because I really like you," the text continued.

The prosecution then referred to evidence given by Alejandro Romero, a concierge at the Eastern Columbia Building in Los Angeles, who said he saw Musk visiting Heard "when Mr. Depp was in Australia," to which she responded, "He’s wrong. I wasn’t even in communication with Elon until 2016."

In a statement, Romero claims that "from March 2015 onward, Ms Heard was visited regularly late at night, at around 11 PM to midnight, by Mr. Elon Musk," alleging that she gave the tech billionaire "his own fob to access the building."

Heard was then asked about her relationship with Franco: "On the topic of what you say about his (Johnny Depp’s) jealousy, you mentioned in your statement that James Franco was someone that Mr. Depp was accusing you of having an affair with and he was quite wrong about it."

She responded, “That’s right," before confirming he came to visit her at 11 PM on the night after Depp allegedly attacked her in 2016. (The court played CCTV footage of Heard going downstairs in the elevator to get him on May 22, 2016.)

"Are you trying to avoid being seen by the camera there?" Depp's attorney asked, to which Heard replied, "We were talking. He was saying to me, 'Oh my God, what happened to you?’ He saw my face... when I let him in. He saw my face and he said, 'What the f--k?'"

"That’s not secretive talking on that camera?" the lawyer responded.

"Yes, it’s discreet," the actress said.

Heard and Depp's court hearings are expected to last all week.