Actor Amber Heard testifies in the courtroom at the Fairfax County Circuit Courthouse in Fairfax, Virginia, U.S., May 16, 2022.  Steve Helber/Pool via REUTERS
Actor Amber Heard testifies in the courtroom at the Fairfax County Circuit Courthouse in Fairfax, Virginia, U.S., May 16, 2022. Steve Helber/Pool via REUTERS

Amber Heard has confirmed she was with James Franco the night before she filed for divorce from Johnny Depp.

As the defamation trial between Heard and Depp continued Tuesday, the "Aquaman" actress shed some light on her relationship with Franco and spoke about the video footage showing them in an elevator together before she divorced Depp.

During the trial, Depp's lawyer, Camille Vasquez, asked Heard why she "felt comfortable having James Franco over the evening of May 22, 2016. "I do not know when James came over," Heard responded.

"Okay, let's remind you," Vasquez said. She then presented the surveillance footage from the day showing Heard and Franco, who co-starred in "Pineapple Express" and "Adderall Diaries," heading to the actress' penthouse. At one point, Franco laid his head on Heard's shoulder and Heard rested her head on his before they left the elevator together.

Heard confirmed the person in the video was Franco and explained why she was with him that night.

"He was my friend and he lived next door," said the actress. "And I had, frankly, exhausted my support network with my usual friends. I was happy to welcome as much friendship at that time that I could possibly get."

When asked if she was aware that Depp was out of town that night, Heard said she was not sure about her husband's schedule. She also insisted they were just friends and recalled how she and Depp used to argue over the actor's suspicions that they were having an affair.

Earlier this month, Heard said in her testimony that Depp "hated" Franco and was mad at her for working with the actor.

"He was already accusing me of having a relationship with him in the past because we already did 'Pineapple Express' together. It went from asking me about how the kissing scene went or how the sex scene went to asking me what James Franco had done in the scene and being really explicit about my body," she said.

Depp previously confirmed that he and Heard had arguments over Franco, saying he believed his wife was cheating on him.

During Tuesday's trial, Heard also said she felt like "falling apart" and was having difficulty sleeping because of panic attacks over her fear of her ex-husband.

"I wanted to change my locks. I wanted a good night's sleep. I was scared and very conflicted because the person I was scared of was also the person I was in love with," she said.

Johnny Depp defamation case against Amber Heard continues in Fairfax, Virginia

Photo: Reuters / POOL