Allen Funt, the “Candid Camera” host whose hilarious, prank-filled shows were the forerunners of the genre of reality-based television, is dead at age 84.

Funt – who ended his gags by telling his unwitting victims, “Smile! You’re on Candid Camera!” – began his idea on radio with the show “Candid Microphone” in 1947. The show moved to TV in 1948, and bounced around the networks until 1960, when CBS picked it up for a seven-year run.

Funt’s idea was to use hidden cameras and microphones to record people’s reactions in unguarded moments as they dealt with unusual situations, such as talking mailboxes or bowling balls without holes.

Some of his stunts have been used in college psychology and sociology classes – such as a man coming up to two doors in a corridor, one with a sign reading, “Use Other Door,” and the other with one reading, “Do Not Enter.”

He explored sexual issues in the X-rated 1970 movie “What Do You Say to a Naked Lady?” which included such stunts as a male “statue” coming to life in a museum, and a guest lecturer who appears nude before a college sex-education class – eliciting no response from the students.

In another classic stunt, members of Funt’s crew get on an elevator – but instead of facing the door, they face the rear. Soon, everybody else riding the elevator faces the rear, too.

“It’s a good illustration of the psychology of group pressure,” Funt said.

David Reisman, a Harvard sociologist, called Funt “the second most ingenious sociologist in America.”

Funt gave many of his tapes and materials to Cornell University, his alma mater.

“Candid Camera” featured many famed actors and actresses in the gags – Woody Allen and Dorothy Collins appeared in some early shows, and comedienne and author Fannie Flagg appeared when the show was in syndication during the 1970s.

Funt’s co-hosts included Arthur Godfrey, Durwood Kirby and Bess Myerson.

Funt appeared in many stunts himself.

In 1969, when someone hijacked an Eastern Airlines plane carrying Funt, his wife and a camera crew, the rest of the passengers stood up and cheered – they mistakenly thought it was just another “Candid Camera” gag.

Funt made a living thinking up gimmicks for radio shows before he served in the Army Signal Corps during World War II.

During his five years in the army, he began tinkering with wire recorders – he liked their portability, and thought up different ways of hiding them from unsuspecting people.

After leaving the Army, Funt began “Candid Microphone” on ABC radio. He also made some movie shorts for Columbia Pictures before taking his idea to TV.

He lived most of his life in New York. In 1978, he moved to a California ranch, where he bred horses and cattle.

“Candid Camera” continued as a series of occasional specials. Today, it airs weekly on CBS, hosted by Suzanne Somers and Funt’s son, Peter.

Funt’s family said the cause of death was complications from a stroke he suffered in 1993.