An actor’s attraction to a given role could be the result of a number of circumstances. For actress Cate Blanchett and “Notes on a Scandal” director Richard Eyre, it was the words of the Zoe Heller novel and the casting commitment of a legend that sealed the deal.

“I had read the novel,” Blanchett explains. “It’s an absolute page-turner and I knew Patrick Marber was adapting it, so I guess the screenplay was the magnet. As soon as Judi (Dench) was going to throw her hat in the ring, the project was like flypaper for me.”

In the film, Blanchett stars as Sheba Hart, a schoolteacher who finds herself at the center of a scandal when she engages in a sexual affair with one of her students. Held emotionally hostage by Barbara, a fellow teacher (portrayed by Dench) who knows of the affair and obsesses over her friendship with Sheba, Blanchett’s character rides a tireless roller coaster of distress in order to keep the affair secret, not only from the public but from her family as well.

“Cinematically, I think to spend time with someone who transgresses a moral boundary like Sheba does, you have to go deep inside who that woman is,” Blanchett says. “Sheba’s a young woman who has married an older man, who feels she has sort of whittled away her youth and has found herself feeling hopelessly without accomplishment or any sense of larger meaning. She’s ready to change her life and, in a strange way, her opening act of rebellion is this relationship with a 15-year-old boy.”

Noting that Eyre “really genuinely felt for the characters,” Blanchett found his take on the material refreshing. “I don’t think you can deal with this kind of subject matter without a touch of humor and irony and visual warmth,” she says.

Meanwhile, starring opposite a master thespian like Dame Judi might prove arresting for even the most seasoned of actors. But in the experience of “Notes on a Scandal,” Blanchett relished the opportunity of watching one of the greats at work.

“I am filled with admiration for Judi,” she says. “She is utterly present in every moment, both professionally and personally. And she’s bloody hilarious!”

Next project: Todd Haynes-directed “I’m Not There,” with Christian Bale, Adrien Brody and Julianne Moore; in “The Golden Age” as Queen Elizabeth I, with Samantha Morton and Clive Owen; and currently filming “The Curious Case of Benjamin Button,” directed by David Fincher and co-starring Brad Pitt and Tilda Swinton