The Flag Code of the United States is rather precise when it comes to dealing respectfully with the flag of the United States.
For example, it is disrespectful to keep the flag of the United States in the elements and allowing it to become stained, discolored, frayed, or torn. The flag should always be lit at night from its own light source and it should never touch the ground (however, in Egypt, the national flag is in fact touched to the ground during certain military ceremonies).
All national flags, including that of the US, have similar rules of protocol such as not allowing the national flag to be used as a cover, not allowing anyone to write on it, add unrelated items to the flag itself, not using the flag to carry something else, or storing it inappropriately.
National flags should be placed to its own right to correspond to heraldic tradition of placing someone or something in that position. Placing the flag at half mast to honor someone who has died is what many countries do, but not all. The flag of Saudia Arabia does not allow its national flag to be flown at half staff, because the Shahada, that is the major part of the flag design, is from the Koran and a civil regulation does not take precedence over Koranic law.
Every national flag has precedence over any other national flag within their own borders. In Canada, though, the personal flag of the Queen takes precedence over the flag of Canada.
In many countries, possession of the national flag by individuals is not allowed and flying or displaying of the national flag is a prosecutable offense. India only recently allowed an individual to hoist the flag on private property, but it took an order from its national Supreme Court to do so. Many countries such as North Korea, China and others believe the national flag is state property, not personal property.
In short, each nation has its own rules, regulations and traditions when it comes to respecting their national flag. Most protocol is based on common sense, others on tradition, and others on religious or political beliefs. One national set of protocols is not the same as another and individual respect for the traditions of other national flags is an excellent way toward international understanding overall.