John McCain figured he would have a tough time getting attention last week. The superstar images of Barack Obama's overseas tour were made for TV. So McCain's people set up their own Hollywood shot: the candidate would chopper over the Gulf of Mexico to an oil rig off the Louisiana coast, where, flanked by men and machinery, he would give a speech promoting offshore oil drilling to ease gas prices. "We won't catch Obama on pictures this week," admitted one McCain adviser who asked not to be named talking about strategy. "But we can at least try and stay in the game."

It wasn't meant to be. Less than an hour after announcing the photo op, the campaign abruptly canceled, citing Hurricane Dolly, which was swirling near the Texas coast. Worse, a runaway barge along the Mississippi River had rammed into a 600-foot oil tanker that morning, leaving a 12-mile-long oil slick that blanketed New Orleans in diesel fumes.

The campaign's big photo op of the week turned out to be a visit to a supermarket in Bethlehem, Pa.—where McCain was photographed in front of a display of processed cheese. As the candidate roamed through the store, his campaign's lanky cameraman knocked over a shelf of Mott's applesauce. The jars skittered across the floor past the senator's feet. When he paused to take questions from reporters, he was briefly drowned out by an announcement on the store's PA system.

All week, McCain aides had been complaining about what they saw as the media's obsession with the Obama trip. They were also unhappy about the thin attention they were receiving. Even Fox News broke away from live coverage of the senator's town-hall meeting to follow the plight of Lil' Smokey, a black bear cub rescued from the California wildfires.

Yet some McCain advisers privately concede the candidate's troubles are not entirely the media's fault. Since capturing the GOP nomination this spring, McCain's campaign has fought to gain its footing and to find a consistent message that defines why he should be elected. It hasn't helped that McCain has resisted pleas from his aides to cut back on the visually dull town-hall meetings he loves and submit to carefully choreographed events in grander settings, where the pictures tell the story. The senator has a deep distaste for the artifice of modern media-driven campaigns—all this business about standing in precisely this spot and reading precisely this line off a teleprompter exactly the same way a dozen times a day.

His staff can spend weeks organizing an elaborate campaign appearance, only to have McCain ignore his stage directions. A stop at a home-heating-oil plant in New Hampshire last week went awry when McCain stood in the wrong place against staff advice and took questions in front of a bright white oil truck. The result: harsh, washed-out pictures of the candidate. At a press conference earlier this month, McCain aides ordered reporters not to turn to look at the senator as he walked to the microphones, fearing he would catch sight of a familiar face and start talking before he reached the photogenic backdrop.

Close friends have urged McCain to pay more attention to the way he comes across on camera. "Senator Obama does a good job with visuals. We need to do a better job," says Sen. Lindsey Graham, one of McCain's closest friends and advisers. "The story is told without anyone having to say one word … We need to do more of that."

Some polishing is already underway. New day-to-day campaign boss Steve Schmidt has brought in White House staging pros to help brighten up the dreary, underlit events. One is Bob DeServi, a former NBC cameraman who left television to work for the White House and is renowned in the business for his obsessive attention to lighting. When Bush gave a speech in New York for the first anniversary of 9/11, DeServi stationed massive floodlights on barges to dramatically illuminate the Statue of Liberty behind him. Greg Jenkins, a skilled Bush advance man, is now working full time to create camera-friendly backdrops for McCain's events.

Instead of standing alone onstage, McCain now speaks surrounded by supporters, as Obama often does. When he takes questions during a town-hall meeting, he has been instructed to approach the audience so they're in the shot. And McCain speaks less from a teleprompter—something he hates doing and has yet to master. Instead, he has memorized his remarks to make his delivery more natural—and to help him stay "on message."

This has been especially difficult for McCain, who continues to riff on any topic that comes to mind, even though it can get him into trouble. Last week McCain told ABC's "Good Morning America" that the "Iraq–Pakistan border" remained extremely dangerous. (The two countries don't share a border.) Aides later said he clearly had meant the Afghanistan-Pakistan border and had simply misspoken. Ditto for McCain's recent identification of the Czech Republic as "Czechoslovakia"—a country that hasn't existed since 1993. (Republicans noted that Sam Nunn, a possible Obama veep contender, made the same slip.) Despite McCain's missteps and Obama's ability to generate big crowds and pretty pictures, polls indicate the race is close. Aides say this is proof that voters don't care about staging nearly as much as reporters do, and that they see McCain's genuineness in his imperfection. They may have a point. Polls released last week showed McCain gaining in several swing states, including Michigan, Minnesota and Wisconsin, and he has taken a slight lead in Colorado. That's one message McCain is having no trouble sticking with.