"ROSELAND," THE NEW James Ivory movie that had its premiere at the New York Film Festival a week ago, opens with a shot of colored lights in the shape of the American flag, the gaudy emblem that crowns the bandstand in the country's most famous ballroom.

It may be stretching things a bit to take Roseland itself as a metaphor for American wistfulness, but there's no doubt the place captures something quintessential about the national penchant for kitsch, and our tendency to idealize the past. Roseland is certainly more than a place where people go to dance the way they used to in the age of the fox-trot or the mambo - it's a rhinestone palace of faded dreams, a shrine to golden oldies, an "eternal prom," as one billboard puts it.

Like the Rockettes or Radio City, Roseland has somehow managed to outlive its own natural life span, kept afloat by devotees who have refused to be stampeded into a lifestyle that encompasses punk rock, porno chic and ecological cataclsyms. It is this pervasive sense of anachronistic survival, as well as the unique old-timerish flavor of Roseland, that the movie attempts to capture. It's likely to prove quite a popular picture, not only because it succeeds in these aims, but also because it plugs into two very current circuits - the new dance consciousness that has seized the nation in the past several years, and the still-rampant nostalgia fetish.

If one is patient enough, every vogue whose passing one mourns eventually returns to fashion. In the case of ballroom dancing, the resurgence is already at hand, as manifest in the rash of classes, tea dances and contests across the country. No one, however, had to restore or reopen Roseland, because it never closed - it just never acknowledged that its day was done.

True, it has accommodated itself to a changing world, to some small extent at least. Roseland is located at 239 West 52d St., just off Broadway. Directly across the street, at 240 West 52d, is Ipanema, a discotheque where '70s swingers cavort to the wee hours. But every Wednesday night at Roseland too, nowadays, a "well-known deejay" spins disco numbers, and Olga Vavaro, a Roseland fixture of many moons, gives free hustle classes.

These are minor concessions, and apart from them Roseland looks scarcely different from its palmier days, to judge from photographic evidence and description. There's the enormous, bean-shaped dance floor, surmounted by, pleated bunting and garlands of chandeliers, encirled by a railing studded with giant grillwork roses, all drakly lit in pink, violet and turquoise. Across it mill the gliding couples, predominantly white, mostly of "a certain age," all in party clothes, women in fur-trimmed, sequined miniskirts or men in vested, double-knit checks. The band covers the gamut from fox-trots and waltzes and tangos to cha-chas and hustles.

Along the wall, and in the rows of chairs beyond the railing, loll relaxing dancers, Roseland "regulars," singles on the make for partners, and those who just like to watch. Off to one corner is the tunnelling Rose Bar. The small lobby contains a ticket booth ($3.50 admission), a soft drink stand, contest trophies, a plaque inscribed with the names of 500 married couples who met at Roseland, and the celebrated Wall of Fame, a glass-encased display of shoes worn at Roseland by Betty Grable, Chita Rivera, Joan Crawford, Joel Gray and other stellar visitors.

On the floor below, along with the checkroom and lounges, is a nook where clumps of patrons sit mutely transfixed watching a TV wall set. This really is a home away from home.

The late Lou Brecker, who died last July before completion of Ivory's film, founded Roseland in Philadelphia 61 years ago, and moved it to New York three years later, around the corner from its present site, at 51st and Broadway. The new quarters opened in 1956. Around 60 million dancers have swirled around its 10,000 square feet of maplewood flooring. The ballroom revival is giving it a shot in the arm, but it's never ceased to be a Great White Way watering spot - only a few nights ago, George Abbott, at 89, spent four hours on the floor learning the hustle.

Ivory's movie, shot almost entirely in the interior of Roseland, offers a trio of stories about Roseland regulars and stray clientele, linked only by the presence of Helen Gallagher, who narrates and plays a dance instructor, and Don De Natale, the real-life Roseland emcee who plays himself.

The first episode has Teresa Wright and Lou Jacobi as a dowdy widow and a rough-hewn New Yorker who find that loneliness gives them more in common than their personalities would suggest. The second features Christopher Walken as a gigolo smoothie who shuffles the affections of three women - Helen Gallagher, his dance teacher and an old flame; the clinging, indulgent lady of means (Joan Copeland) who is his present keeper; and a forlorn, vulnerable Geraldine Chaplin, recently abandoned by her husband.In the final episode, Lilia Skala plays a florid oldster, a cook from Schraff's with the manner of a continentai Grande Dame who dreams of winning the Peabody contest at Roseland and would just as soon die in the attempt as go on living as a loser.

The pat stories are pretty sudsy, and the characters rather superficially stererotyped. But the movie works on the strength of the performances, which are without exception sensitive, vivid and handsomely nuanced. Ivory seems to have the knack of getting his stars to transcend the banality of their roles - the actors sound depths that are not in the lines, and come across not as types but as people.

There's surprisingly little dancing for a movie about a ballroom, and most of what there is is photographed more for emotional tonality than terpsichorean appeal. But the picture grasps something about Roseland perhaps more at the core of the place than even the dancing that is its raison d'etre - the curious, hallucinatory air of melancholy that tinges the darkened hall like a plaintive tune. People go there to "have fun," to lose themselves in music and steps and reveries of youth, and they return like addicts.

Yet there's a distinctly pathetic aura about Roseland, a compound of wilted dreams and a refusal of age. One has the feeling that if a bright light were suddenly turned on, the sight would be hurtfl, distressing. And the movie has caught this quality, without slighting the vibrancy or tinsel glamor of Roseland, and that is its finest achievement.