Step 1: Adjust your thinking
Flies are animals and animals are complex organisms. One might think that doing behavior on a fly might be easier because, well, they are insects and not mammals. Unfortunately, it is not necessarily easier to perform fly behavior experiments. If you want to understand fly behavior, you need to think like a fly (more on this later).
Step 2: Check your parameters
Are you doing your experiment in a well-controlled environment? Not all behaviors are sensitive to all parameters. But, here are a few we have run into that have affected different behaviors at one point or another.
These are things you need to watch out for while doing the experiment:
Time of day
Lighting
Humidity
Temperature
Ambient noise
Substrate the flies are behaving on (agar, food, plastic)
Satiation (or food deprivation) state
Mated state (ex. virgin, recently mated?)
Age of flies (don't forget to adjust this for rearing temp)
Number of flies in chamber
Material of chamber (If you are using printed plastics, is the material bumpy? Are there distractions like pieces of cotton? Is food present?)
Size of chamber
Shape of chamber
Air flow in chamber
Experimenter odor (don't wear perfume or cologne!)
Did your flies get bumped / dropped?
These are things you need to watch our for during fly rearing:
Light / Dark cycle
Brightness of incubator lights
Temperature
Humidity
Type of food (this is REALLY important)
Density of flies in vials / bottles
Vibrations in rearing chamber (incubator, etc)
With regard to the flies you are using:
Genetic background (Canton-S, Berlin, Oregon-R, DL, etc, ALL have different behavioral profiles)
Is it really wild-type? (hint - if they have white eyes, your flies are not wild-type - they are mutants)
How many transgenes are in your flies?
Are there balancers (or dominant mutations that can potentially affect behavior) present?