An hour before the game, with Secret Service agents rushing about and the Baltimore Orioles' dugout being cleared, Scott McGregor turned to Mike Flanagan and said, "I'm glad it's you and not me."

If anyone could have predicted the Orioles' 6-4 loss to the Cleveland Indians this afternoon at Memorial Stadium, McGregor could.

Two years earlier, he experienced the joys and pains of an opening-day presidential visit, walking six in 5 2/3 innings and admitting, "I got a little rattled."

By game time, Flanagan knew President Reagan and his entourage would be spending a couple of innings in the Orioles' dugout, but as he said later, knowing what he had to deal with and dealing with it are different things.

After allowing six runs in his last 25 exhibition innings and walking only four batters all spring, he never got out of the gate today, as Baltimore's largest regular-season home crowd in history (52,292) saw him leave two batters into the third inning. (President Reagan left after the second inning.)

"That's what opening day is about -- confusion," Flanagan said.

He left with the Indians leading, 3-0, and when reliever Rich Bordi allowed two more runs to score, Flanagan was charged with five runs, four hits and -- worst of all -- three walks.

Forget everything else about opening day. After being down by 5-0, the Orioles were dead, and three Cleveland pitchers combined on an eight-hitter to beat them.

Forget that Flanagan had plenty of alibis. The defense behind him made at least two mistakes, and the Orioles' hitters went one for seven with runners in scoring position. The biggest failure was in the fifth when they had cut the margin to 5-2 and had second baseman Alan Wiggins on third with one out.

Result? Lee Lacy popped to second and Cal Ripken struck out.

They also had the bases loaded with two outs in the eighth, but reliever Ernie Camacho, throwing at 94 mph, got catcher Rick Dempsey on a pop to shortstop Julio Franco for the third out.

"All I can say is I didn't get my feet on the ground, and that's pretty important," said Flanagan. "I felt good and all, but I never got into the flow of the game."

The Orioles timed his fast ball in the 88-89 mph range, and Flanagan said, "The velocity and all was there, but I didn't feel like it was. It's especially frustrating because of the spring I had. This is not the way I pictured the day was going to turn out. When I got behind early, every pitch became crucial, and I made a series of bad pitches."

Bordi's numbers were excellent -- six innings, five hits, one run -- but he did inherit two runners and allow both to score, one on Brook Jacoby's single and another on Mel Hall's sacrifice fly.

So by the time the Orioles started coming back, there was too far to come -- a 5-0 deficit.

"I'm not an excuse-maker," Orioles Manager Earl Weaver said. "We knew it would be this kind of day, and that's why opening day is special. If Flanagan had thrown a shutout, we'd have said the president being here took his mind off it. Three of the people he walked score, and that's what's going to kill you."

By the eighth, though, the Orioles were back in it, trailing by 6-3 and going for more against Cleveland starter Ken Schrom (seven innings, eight hits). Lacy (two for five) opened the eighth with a double and promptly scored on Ripken's single to make it 6-4.

Cleveland Manager Pat Corrales went to left-hander Jamie Easterly, who got first baseman Eddie Murray on a soft grounder to the mound and center fielder Fred Lynn on a strikeout but then walked designated hitter Mike Young and left fielder John Shelby to load the bases.

Corrales walked to the mound again and waved in right-hander Camacho.

Decision time. With Dempsey coming up, Weaver could let Dempsey hit or send up a left-handed pinch hitter, Larry Sheets or John Stefero.

The case for the pinch hitter: Dempsey hit only .204 off right-handed pitchers last season and he is three for 46 with the bases loaded and two outs for his career. To which Weaver responded: "That's baloney ."

Weaver relies on two things: how a hitter has been swinging and how he has done against that pitcher. On this point, Weaver wins the debate: Dempsey is one for three off Camacho and coming off a spring training in which he hit .319. Sheets hit .169 in spring training, Stefero .235.

"Anybody who has followed us through spring training knows Dempsey is the guy I want up there," Weaver said. "People on our bench hit far less."

Nonetheless, Dempsey popped out to shortstop, and that was that.

"I'd like to have it again," Dempsey said. "No, I didn't think he'd pinch hit for me. Camacho is a fast-ball pitcher, and I'm a fast-ball hitter. I might have been a little anxious, but Camacho made the pitch he had to make."

So when it was over, Weaver was left sipping a cold beer, in a very warm office and contemplating an 0-1 team.

"Well, it was exciting," he said. "It wasn't 13-0 like it was a few years ago. If it'd been that, those people would have all been gone. This way, we had a shot."

Shelby, who was the Orioles' hottest hitter at the end of spring training, got a single, double and walk, but Weaver, who plays the numbers, might not play him Wednesday against Cleveland left-hander Neal Heaton. Shelby is only four for 25 (.160) against Heaton, and Juan Beniquez is five for 13 (.385) . . .

The previous record regular-season Memorial Stadium crowd was 51,956, for the 1982 Orioles-Kansas City Royals opener . . . The Orioles have lost three of their last four openers, but are 20-13 on opening day . . . Cleveland catcher Andy Allanson, playing in his first major league game, went three for four with an RBI and an error. He's a Richmond native and had his parents and three sisters at today's game. "When I heard them introduce Eddie Murray, I got chills," Allanson said.