Yes, this is classic stuff but still useful.
This works with stand-alone flag files. 600x300 pixel flags will work great.
You may find the last transformation a bit exagerated for some flag proportions. If so, just get a few steps back in history and do it yourself. Have fun!!!
Note - seems like the action is not compatible with PhotoshopCS. I'll fix it soon.