The excitation-transfer theory purports the idea that residual excitement from one stimulus can amplify the excitatory response created by an other stimulus even if those two stimuli are cognitively interpreted as different emotions.
For instance, the anger or fear (adrenaline action) that might be felt while watching one part of a movie can stimulate the sense of relief that is felt when the situation resolves itself.
An example of this could be seen in this movie from the '50s about a giant genetically-engineered tarantula that victimizes a town and its citizens, killing several of them. Later on in the film, the tarantula is incinerated by a bomb thereby saving the town. The ultimate sigh of relief from the audience was based on the combination of tension created by the tarantula's growth and aggression, followed by the relief at the violent death of this creature and a return to safety. This excitation-transfer formula is a standard formula for maintaining tension in horror movies.