In some insects, the mating process begins with dancing (rhythmic movement). Dancing is a courtship ritual that often leads to foreplay and later sex. Picture wingedflies and fruitflies are example of such insects. Fruitflies have an elaborate courtship dance ritual consisting of seven steps or basic movements and ending in foreplay (tapping and stroking of the females body by the male with his feet and legs. Foreplay can also include touching the body with the mouth-parts or even stimulation of the female's genitalia with the mouth-parts. Fruitflies typically remain in sexual union for a couple of hours. Source:Wangberg, James K,2001, Six Legged Sex.