Draw your map using the Tools within Xara so it is all vector, not a bitmap (raster) image.

Group the shapes used to make the flag.

Copy the Group to a new Animation document. This will be Frame 1 by default.

Apply a Default Envelope using the Mould Tool, adjust the flag to look like it is waving.

Copy Frame 1 to create Frame 2.

Adjust the Mould Tool Default Envelope to change the flag shape. Repeat as necessary to create a full range of waving still images.

Preview your animation as an animated gif. Make any changes to individual frames so the animation looks the way you want.

Export your Animated gif.

The animated waving flag in the link Shapeshifter provided in an earlier post consists of only two frames.

Xara's Flash animation does not like working with Moulds so it would require a slightly different approach to create a Flash animated waving flag.

Work on creating an animated gif version and post your result.