Prince always seemed to do everything his own way: When he went Hollywood, he even did it by starring in Purple Rain, a movie loosely based on his own life and featuring himself on the soundtrack. Writing songs for a superhero blockbuster didn't seem like the type of thing Prince would ever be interested in, in other words, but he made an exception for Tim Burton's 1989 Batman movie – and scored himself a chart-topping hit in the bargain.

For Warner Bros., the studio behind the film as well as Prince's record company, getting one of the label's biggest stars to contribute to a major film soundtrack made perfect business sense. But Burton, always an idiosyncratic filmmaker more concerned with serving his muse than feeding a studio's bottom line, took some arm-twisting before he'd agree. Already known for his working relationship with Oingo Boingo frontman Danny Elfman, Burton hired Elfman for Batman and didn't want anyone else's music.

"They’re saying to me, these record guys, 'It needs this and that,' and they give you this whole thing about it’s an expensive movie so you need it. And what happens is, you get engaged in this world, and then there’s no way out. There’s too much money," Burton told Rolling Stone's David Breskin. "There’s this guy you respect and is good and has got this thing going. It got to a point where there was no turning back. And I don’t want to get into that situation again."

Prince, on the other hand, seemed far more accommodating. Although legend has it he was pressured into taking the Batman gig to score a surefire hit after a couple of mildly disappointing releases for the label, he certainly took to the assignment once he accepted it: According to producer and longtime Prince associate Mark Canton, three weeks after committing to contributing to the soundtrack, he'd completed a complete nine-song album.

Arriving at a track listing everyone could agree on still took a little work, however. For the film's parade sequence, in which Jack Nicholson's Joker showers the citizens of Gotham with free money before dousing them with gas dispensed from a fleet of giant balloons, Prince reportedly submitted the song "200 Balloons," only to be told it didn't work. Ultimately, "Balloons" was relegated to the B-side of the record's leadoff single, "Batdance," and replaced with "Trust."

Being beholden to the artistic whims of others must have required an adjustment for Prince after so many years of controlling his own musical destiny, but if the experience was a negative one for him, he didn't let on. Eager to soak up filmmaking knowledge, he took the opportunity to observe Burton's experiences on the set — which only reinforced his desire to make movies for himself over the studio, even if it meant releasing lesser-seen projects like Under the Cherry Moon. For one thing, the stakes were a lot lower.

"There was so much pressure on Tim," Prince told Rolling Stone. "For the whole picture, I just said, 'Yes, Mr. Burton, what would you like?"

Hear Prince Perform "Trust"

Prince Albums Ranked in Order of Awesomeness