"Galaxy Quest," a mischievous spoof of the "Star Trek" phenomenon, boldly goes where everyone has gone before. And has a swell time getting there. This affectionate space oddity sets a dead-on for the cheesy sets, ham actors and old-fashioned idealism that define the enduring TV series.

Thanks to a game cast, clever screenwriters (David Howard and Robert Gordon) and director Dean Parisot's light touch, "Galaxy Quest" is funny without being flip. Of course, the better you know science-fiction cliches, the more hilarious the trip. Where else can a space traveler step out of the shuttle and fearlessly take a big gulp of fresh air?

The "Galaxy Quest" of the title is a prime-time space opera that takes its cues from the optimistic "Star Trek" vision of tomorrow, one in which a multiethnic crew of beings, clad in tight jumpsuits, explores the galaxy in a gleaming starship. "Galaxy Quest" only lasted four seasons and was canceled 18 years before, but its five stars are still in costume, making appearances at sci-fi conventions and signing autographs for faithful Questerians.

Unbeknownst to the cast, transmissions of "Galaxy Quest" have been intercepted by the Thermians, an endearingly naive but technologically clever race who have mistaken the episodes for "historical documents." The beatific, doughy-faced ETs from the Klatu Nebula are also big fans of the swaggering Cmdr. Peter Taggart (affable Tim "Buzz Lightyear" Allen) and the crew of the NESA Protector.

The Thermians have built a working replica of the Protector and beam to Earth hoping to persuade Taggart and his shipmates to lead them into war with the ruthless insectoid Sarris (Robin Sachs) of Fatu-Krey. Taggart assumes they want him to officiate at some function, maybe cut a ribbon, so he agrees to the adventure and is astonished to discover that the ship, like Sarris and the Thermians, is the real deal, not just Sheetrock.

Now he and his co-stars must finally become the heroes they pretended to be. There's no doubt that they'll achieve their goal. But it's the journey that counts, isn't it?

Though the movie begins with a leisurely prologue that includes clips of old "Galaxy Quest" episodes, the tale takes off at warped speeds once Taggart and his disgruntled colleagues join the crusade. They've always hated being stuck in the roles that made them famous.

None, however, complains quite so theatrically as Alexander Dane (acerbic Alan Rickman), a Shakespearean actor forever typecast as Dr. Lazarus, the commander's thoughtful, half-reptilian No. 2.

Sigourney Weaver, who has whupped "Alien" butt during previous voyages, returns to space travel in a better mood as the gallant female lead of "Galaxy Quest." She was never taken seriously as the communications officer, Lt. Tawny Madison, whose sole purpose seemed to be to repeat the data given by the ship's computer. Though still got up in a flowing blond wig and a gravity-defying wonder bra (designed to withstand even the pull of a black hole), Tawny manages to liberate her true self in hand-to-hand combat with the Thermians' slimy enemies.

Also on board are Daryl Mitchell as the plucky grown-up child star who piloted the Protector and now finds himself flying by the seat of his pants; deadpan Tony Shalhoub as the guy responsible for beaming people up at the last minute; and Sam Rockwell as Guy, a former extra who is convinced he's doomed to die. Enrico Colantoni (of television's "Just Shoot Me") sounds suspiciously like a Conehead as the leader of the Thermian forces.

The special effects are state-of-the-art and like the actors demonstrate quite a range between the dazzling here-and-now and the good old days when viewers were willing to accept the vision, even one as insanely optimistic as Gene Roddenberry's "Star Trek," no matter how clumsy its presentation. Let the farce be with you.

Galaxy Quest (102 minutes, at area theaters) is rated PG for space violence.