2. We were listening to music when the lights went off
The lights went off while we were listening to music.
3. I lost my keys when I was running on the beach.
I was running on the beach while I lost my keys.
4. Somebody stole my bag while I was talking to my friend.
I was talking to my friend when somebody stole my bag.
5. Danny called while you were taking the dog for a walk.
You were taking a dog for a walk when Danny called.
6. I was getting ready for the beach when it started to rain.
It started to rain while I was getting ready for the beach.