This functions well when I’m just F5ing for previews locally, but it isn’t working on Axure Cloud when I publish the prototype. Upon looking at the source code, it appears as if Axure Cloud is attempting to hook to a location on cloudfront.net, which obscures the already assigned URLs. It must be something done during the publishing process to “self host” otherwise embedded images.
I don’t think there is a reliable way to do this using a URL. However, there is way to display a flag based solely on its country code, no matter how many flags you need. It takes a little setup.
You first have to create a sprite sheet of all desired flags. (The site you referenced doesn’t reveal such a sheet, sadly.) The flags in the sprite sheet below are are arranged left-to-right, top-to-bottom.
Next, create a space-delimited string of all two-character country codes in the same order. For the sheet above, it would be:
AD AE AF AG AI AL AM AN AO AQ
It wouldn’t be a huge task if you winnowed the sprite sheet down to flags you actually plan to use.
Here’s a sample with two versions, the second of which is far friendlier to incorporate into a given prototype.
Thanks, Joe! I didn’t want to go to the effort of downloading all the flags and setting things up when an API was available and functional via preview - We can get there with our imagination and I’ve got a lot on my plate. Sincere thanks for your time here, bud - That’s a really clever solution and I’m sure it’ll help others in the same situation, as it’s a fairly common pattern.
Thanks for your time, monkey. Unfortunately, while it continues to work in an F5 preview, that fix doesn’t seem to be resolving anything once published via AxShare.