A tall man with makeup on his face picked his way across the shop floor at the American Cable Co., stopping to shake hands, asking the assembly workers what they were doing with lengths of copper wire and plastic casings colored red, yellow and green.

Behind him trailed a makeup artist with potions and a box of Kleenex; three aides; a producer; a direct-mail consultant; a pair of still photographers - and Glen Pearcy with a video camera.

One of the retinue said something, and Democratic mayoral candidate Tom Knox shed his jacket and rolled up his sleeves.

"If you're walking through the plant, you want to be in shirtsleeves - it's a little less businesslike and more 'man of the people,' " Knox said later.

The scene last week in the Hunting Park factory, which makes battery cables for heavy equipment, could wind up as a few seconds of background in a future Knox TV ad.

Those spots have dominated the Philadelphia airwaves over the last few months - 30 seconds at a time, thousands of times. More than anything else thus far, they have shaped the 2007 mayoral campaign - vaulting Knox, a former insurance executive and virtual political unknown, into first place in the five-way Democratic primary for mayor.

The man behind the ads, media consultant Joe Trippi, who helped make Howard Dean the early front-runner in the 2004 Democratic presidential primaries, has been sculpting the Knox image: Political outsider driven to clean up the city.

A Keystone Poll released last week that found Knox leading the Democratic field also found that voters remembered Knox's ads most vividly of all the candidates' messages, and it's no wonder. The self-financed millionaire has spent about $4.9 million on TV time since December, nearly four times more than his nearest rival.

Taken together, the ads portray Knox as a man who grew up in the projects, who dropped out of high school to join the Navy, who sent his pay home to his mother, then became a success story. In the memorable words running through several of the spots, Knox says he wants to "take the 'For Sale' sign off City Hall."

His opponents say that image is bunk. They point out that Knox, a former deputy mayor during the Rendell administration, has been a major donor to politicians, and that his companies have done business with government.

His rivals hope the businessman's balloon begins to deflate just as Dean's did in the Iowa caucuses three years ago.

"It's ugly time," Trippi said. "Because we're in the lead everyone's going to start attacking."

Trippi signed on with Knox 19 months ago, intrigued by the chance to work with another insurgent candidate. The consultant swears Knox came up with the "For Sale" theme of the campaign.

"Before I got the job, I asked, 'Why are you running? He said, 'To take the damn 'For Sale' sign off City Hall. They were the first words out of his mouth. . . . I told him to get rid of the damn and we could use it."

Knox was slow to talk about his personal story, Trippi said. Details about his childhood in the housing projects emerged as the two got to know each other. In one biographical spot, Knox remembered the sound of his mother crying herself to sleep because she feared she would not be able to feed him and his brothers.

"He just blurted it out," Trippi said. "That's how the best spots happen. Those are the ones that have real impact."

Voters cite the ad frequently in interviews.

Mimi Hall of South Philadelphia said she was "blown away" by Knox's first commercial. In that spot, he talked about his mother and said "he's running for all the mothers, to try to make a change in this city with the corruption and the drugs and violence," said Hall, 51, now a campaign volunteer. "He inspired me, you know."

Brian Thomas said he just changed his voter registration from Republican to Democrat so he could vote for Knox in the May 15 primary. "It was his advertisements," said Thomas, 46, a lawyer from South Philadelphia. He said he liked that Knox started out poor and that he was financing his own campaign. "He's not establishing any obligations that can come back to haunt him - and us," Thomas said.

After the cable factory, Trippi's film crew decamped to OIC, a vocational-training institute in North Philadelphia. While technicians set up klieg lights in a test kitchen, Trippi took phone calls from a presidential campaign in Nigeria he is advising, and pollster Paul Maslin, with whom he has worked on several campaigns, including Knox's.

"It's a great business - hurry up and wait," Trippi said, sipping a Diet Pepsi between calls. Finally, the room was ready and Knox observed while chef-instructor Chalie Schmidt taught a group of students how to chop and blanch vegetables for sauteing.

"Explain it to Tom, not the cameras," Trippi directed the instructor. He did not have to direct cameraman Pearcy; the two have worked together for 25 years.

"You'll probably see six seconds of this in the whole campaign," Trippi said later. The entourage watched other culinary arts students making potato chips - Knox sampled a few - and then moved to another room where construction students were learning how to install lighting.

Knox has made a call for more vocational training a theme of his campaign, and Trippi said the footage from the day would probably be used in a commercial about workforce development in a couple of weeks. There is no script, he said. When the time comes to finish the ad, Knox will speak in front of a "green screen" in a studio and he'll be spliced into the piece while the scenes flash behind him.

That part is done last, just before the ad is shipped to TV stations, so Knox's words can be adjusted to respond to what is happening in the campaign.

"The next spot could be something he says to me tomorrow," Trippi said.

Contact staff writer Thomas Fitzgerald at 215-854-2718 or tfitzgerald@phillynews.com.