Skip to the 8:24 mark here for a video demonstration.
Leg swings are a great dynamic way to warm up the muscles of the hip.
Although most people believe the moving leg is the one we are warming up, the stance leg is being subjective to eccentric loads and warming up for proper single-leg stance.
Brace the abdominal wall and keep it rigid.
It's as much for the stance leg as the swinging leg.