A new apparatus automatically applies odors to an airstream, while filming and analyzing the behavior of insects simultaneously. A first series of tests have revealed that male and female fruit flies respond differently to attractant substances. Male flies are no longer attracted to females that already mated with another male because a deterrent odor that surrounds these females.