Flag one controls the hero in spot one, flag two the one in spot 2, flag 3 in hero no 3. The whole party is controlled by the group flag (where numbered flags go before the group flag)
This is from the time that you where only allowed to bring 3 heroes. the rest needed to be either henchman or anothe rpartymember with heroes. I think bout 1,5 years ago they added the possibility to add 7 heroes, but never changed the flag system. Either cause they couldn't be bothered or cause they intended the way it is now.