A flag can be attached to a flagpole a right way and a wrong way. A common mistake that some make when attaching a flag to a flagpole is to put the tension of the halyard (the looped rope) directly on the flag, using the flag to complete the loop. Doing so unnecessarily shortens the life of the flag because strain is transferred to the flag, which can result in the flag's grommets tearing.
Loop the halyard through the pulley on the top of the flagpole.
Loop each end through the (non-snapping) eyelet of a snap hook. Position the hooks far enough from the two ends of the rope so these two ends sum up to more than the height of the flag.
Knot the snap hooks into position.
Snap the flag onto the snap hooks through the flag's grommets (eyelets).
Tie the ends of the rope together so that the flag pulls the spring-loaded ends of the snap hooks slightly toward each other.
A useful way of threading the snap hooks onto the lanyard is to double over the lanyard to make a loop, insert the loop into the snap hook eyelet and pull the loop up and over the spring-load hook to the other side of the snap hook. You may want to use what is called a "square knot" for Step 5. It's useful for joining two rope ends, especially for rope under tension, yet is easily undone if needed. Don't worry about extra rope length. That's taken up by looping it around the cleat at the bottom of the pole.