In an interview for "Rolling Stone" magazine back in 2005, Madonna explained the creation of her "Confessions On A Dancefloor" album...
“Confessions On A Dance Floor” began as a musical film. The French director Luc Besson, best known for The Fifth Element, was writing a screenplay about a woman on her deathbed looking back on the life she thought she had lived but, due to senility and amnesia, didn’t actually experience. Madonna, who was set to star in it and write the music, began working with Stuart Price, Pat Leonard and Mirwais on songs spanning the last century of popular music.
“I had to write music from the Twenties, big-band stuff from the Forties, Sixties folk music a la Joni Mitchell or Joan Baez, punk, and music from now, which is where ‘Hung Up’ came from,” she explains. “I made my own research book, and I had tons of reference material. But when I finally got the script, it was 300 pages long. And I was really not happy with it. It wasn’t what I wanted it to be. It just wasn’t.”
The disappointment still lingers in her voice. Like most successful people, Madonna is not a quitter. So though she didn’t like the script, she refused to abandon the material she’d written.