Painting the background shouldn't be a complicated task if you have made a sketch or drawing first. Once that is complete, you can go ahead and sketch on the wall itself with a pencil. (Do not use marker to sketch on the wall, someday the marker will bleed through the paint. Believe me, I've learned from experience.)
Once you've made your sketch on the wall, you can go ahead and apply paint (remember to do the background first). The first coat usually won't be enough. You should use several layers of paint until the background is opaque. Once your opaque background is painted in and dry, it is time to add the foreground, or in your case, the flag. This flag, which you want transparent, needs to be painted with thinned paint, but not too thin.
Experiment with this. If you can't see the the background through the paint, take a rag or sponge and wipe the paint off before it dries. If it is not transparent, then the paint wasn't thin enough. This might take some practice.
I wish you much luck with your project.
Muralist~ D. Windseth