Bob Cavallo was starting to panic.

Three weeks behind schedule, the movie producer had only one week to shoot all of the concert scenes for “Purple Rain.” If he didn’t meet the deadline, his insurance company would bring in a new producer and director to finish the movie.

The first-time producer was working with a first-time director and, of course, a first-time star. Needless to say, he was beyond anxious.

Cavallo arranged for no fewer than five cameras to shoot the performances by Prince and the Revolution, the Time and Vanity 6.

“You know how perfect Prince was,” he recalled. “If there was a spot he had to land on with a body spin, it was exactly the same every time.”

The deadline was met. An international superstar was born.

Cavallo, leader of a three-man team that managed Prince from 1979 to ’89, has countless tales about the Minnesota icon who died three years ago this Sunday. He’ll discuss “Purple Rain” on a panel next weekend as part of the third annual Celebration at Prince’s Paisley Park studio in Chanhassen. (Read about other highlights of the week here.)

He and Prince had a falling-out before the star’s third movie, 1990’s “Graffiti Bridge.” Cavallo went on to start another management firm (its clients included Green Day, Seal and Alanis Morissette), and produce such movies as “City of Angels” and “12 Monkeys.” In 1998, he took over Disney’s music division, working with everyone from Miley Cyrus to the Plain White T’s.

Cavallo retired in 2011. But he isn’t reticent as he approaches his 80th birthday in May. In a rare interview, he had a lot to say about Prince’s flaws as well as his talents.

On how they met:

When Prince started touring in 1979 after the release of his second album, he became enamored of Earth, Wind & Fire’s live show with its magical special effects. He asked to meet the group’s manager.

Enter L.A.-based Cavallo, who also had worked with Weather Report, Little Feat, Lovin’ Spoonful and others.

He encountered Prince at an uncommon moment of insecurity. “Prince said, ‘When I saw that [Earth, Wind & Fire] show, I didn’t think I could do something that great.’ I said, ‘I’m sure you can.’ ”

He went to see Prince in concert. The wannabe rock star was performing in a trench coat, leg warmers and a G-string. Cavallo gave Prince a favorable post-show review backstage but opined: “I don’t think you should go out onstage in your underwear.”

“Prince says, ‘OK, stay for the next show, I’m going to take off my underwear.’ And the band howled.”

On the early years:

Cavallo remained based in California, but Prince would occasionally invite him to the Twin Cities to hear some music. “He was respectful to me,” the manager said.

At the same time, Prince had his own ideas. In 1982, he wanted to do a double record. The managers were against it. Of course Prince prevailed, but not before Cavallo sent him back to work to come up with a potential first single. It became the title track: “1999.”

Prince wanted to offer one song that wound up on the album to another artist to record. Cavallo countered: “Are you crazy? What songwriter would write a first line like ‘The way you parked your car sideways, I knew it wouldn’t last’? Who writes something that good?”

“Little Red Corvette” became Prince’s first Top 10 hit.

On getting a new contract:

After the release of “1999,” Prince’s contract with the L.A.-based firm of Cavallo, Ruffalo & Fargnoli was due to expire. CRF offered a new five-year deal but he wouldn’t sign it unless they got him a movie.

“ ‘And it can’t be financed by some drug dealer or jeweler,’ ” Cavallo remembered Prince telling him. “ ‘And it has to be a major studio and my name has to be above the title.’ ”

Cavallo enlisted the writer of “Brian’s Song,” a successful 1971 TV movie. That initial version of the screenplay “was ‘Purple Rain’ but very TV and not very cool. Every director in town turned me down.”

So did possible financiers including David Geffen. Cavallo got a bite from Richard Pryor’s film company, which was run by Jim Brown, the football great turned actor. But Brown wanted to wait until Prince went on tour again and “got more famous.” Said Cavallo: “Prince is not a guy who waits.”

On his faith in Prince:

“I wasn’t sure how his dialogue — his acting — was going to go. But I had a perhaps naive belief that the kid could do anything. I watched him rehearse for years. No one had the attention to detail he had. I thought, ‘He’ll figure a way to do it.’

“Of all the talents he had — and they were huge — the one that blew me away the most was his confidence.”

The 1984 film wound up grossing $70 million. “On a $2 ticket or whatever it was,” he boasted. “That’s the equivalent of $250 million today.”

On Prince’s nerves:

The singer would get apprehensive when it came time to hit the road. During rehearsals for the Purple Rain Tour, he was performing a song in a bathtub and it was shaky. He jumped from the stage onto a table where his managers and production staff were sitting.

Cavallo tried to reassure him: “You’re nervous. I’ve done a million of these. … Four days before you leave, everything looks like it can’t possibly come together. But that’s the way it is. I know we’re on time.”

On making ‘Cherry Moon’:

Prince had a three-picture deal. For the second movie, Cavallo wanted to make a “Purple Rain” sequel with Morris Day and the Time. He said the superstar felt “insulted” and got “angry with me.”

Prince had his own ideas for what became “Under the Cherry Moon,” and they didn’t include music. Madonna was interested in the part Kristin Scott Thomas wound up playing, but Cavallo thought the black-and-white film’s story line — with Prince playing a 1930s-era gigolo — was “reactionary” and didn’t think the star should die at the end.

Prince told him: “That’s a nice story for somebody else. I’m gonna make my movie.”

In retrospect, Cavallo sees the 1986 film as a turning point in his relationship with Prince. “He started to not believe in anyone but himself.”

Cavallo had to beg Prince to write a hit song for the movie.

“When you said ‘Write a hit,’ he wrote a hit. This time it was ‘Kiss.’ ”

On Prince and money:

The 1988 album “Lovesexy” — a commercial disappointment — was Prince’s last with Cavallo. On that tour, the singer made his entrance in a Ford Thunderbird, but when he looked at a video playback during rehearsals, he decided the car made him look too small.

“So I was told to get a three-quarters version of the car. Only Prince could do that,” Cavallo said.

“He totally, totally did not care a whit about budgets, money, etc. Before we finally parted ways, he was spending, I’d say, over $100,000 a week making videos at Paisley Park that meant nothing. [For] girls he met. He’d fly cameramen in. He was unstoppable.”

Prince canceled a concert at London’s Wembley Stadium simply because rain was forecast and scrapped the rest of his European tour.

“Prince said: ‘We’re going back to Paisley Park and I’m going to make a film.’ ”

On their falling-out:

At a meeting with Prince and their respective lawyers, Cavallo said he told the star he had to be more realistic. Then Prince gave him a handwritten, 20-page treatment for a movie. “Get me the money to make this,” he commanded.

Cavallo read it and proposed getting a hip young writer.

Prince responded: “I don’t want any writers. This is the screenplay. The movie’s in my head. I can do it.”

Cavallo said he told Prince: “Goodbye and good luck.” Prince got Rod Stewart’s managers to help him make “Graffiti Bridge,” which wound up earning less than half of the underwhelming $10 million that “Cherry Moon” had grossed.

On how they stayed in touch:

“When I was at Disney, he’d call me,” Cavallo said. “He paid me a hundred grand for a couple of years just to answer questions whenever he had questions. He didn’t recognize he wasn’t writing stuff that was as immediate as he had done in the past.”

After Prince’s death, Cavallo wanted to collaborate with “Purple Rain” director/screenwriter Albert Magnoli on a Broadway version of the film. He even lined up an interested investor, but Troy Carter, entertainment adviser to the Prince estate, wasn’t interested in working with Cavallo’s team, the producer said.

On Prince’s faults:

“He was a control freak. Vanity? We can’t bust him with that. He once said to me just after ‘Purple Rain’: ‘How do you rank me?’ I said, ‘Oh, top 10 for sure. Some days top five, depending on my mood.’ He laughed.”

Cavallo was shocked to learn of the opioid addiction that led to Prince’s death: “I never thought he’d be somebody to take a drug.

“He obviously didn’t understand how dangerous his condition was. It still shocks me. He was such a self-reliant guy, maybe to his detriment.”

Cavallo wishes now that he had given Prince more philosophical guidance about life.

“I could have been more like a father. That’s what he needed. I could have been that if I’d moved to Minneapolis. He needed someone to say, ‘You’re full of [crap]. You don’t believe what you just said.’ Nobody took him on. I took him on a couple times. He needed more of that.”