Star Wars has a clear key signature and opens with an enormous tonic chord of B flat major, clearly establishing a major tonality.
Though there are quite a lot of A flats and some D flats used up to bar 29 (1'08), the music is in the key of B flat with a huge amount of certainty, supported by strong perfect cadences (such as bar 4, 0'07 or bar 21, 0'48).
Overall, a huge amount of conviction and heroism is established as a result of the firm major tonality John Williams uses as the opening credits scroll up the screen.
From bar 33 (1'16), it is clear that the music has modulated as there is no resolute chord of B flat to ground the music back to the home key. This creates a lot of turmoil and the lack of perfect cadences or functional harmony up until bar 41 (1'35) makes the music quite atonal.
From bar 34 (1'36) a pedal note of a C is heard, suggesting that this is the new tonic - perhaps C minor as there are 3 flats in the key signature now. The leitmotif from bar 53 (1'58) contradicts this as a D flat chord is heard simultaneously. Tension is created as a result of there seeming to be two different tonalities, which is called bitonality.
Overall, the tonality in the second part of the extract is highly unsettling and helps to create a feeling of suspense and excitement as the viewer is plunged into the action at the start of the film.
Howard Shore's music for Lord of the Rings was incredibly cinematic but at the start of the trilogy - which begins in the Shire - he created a very poignant score which represented the pastoral, peaceful and happy land where the hobbits lived.
The entire piece is in a major tonality with many clear perfect cadences establishing it firmly. The music is also very diatonic with very few digressions from the home scale.