In which sentence does an adverb clause modify a verb?

The flag ceremony ended sooner than we expected.

We saluted because the flag had been raised.

I wanted to visit the museum while “The Star Spangled Banner” was still being displayed.

The flag, flapping in the wind as I attempted to do my studies, made concentration impossible.

"I wanted to visit the museum while 'The Star Spangled Banner' was still being displayed."