PayPal country list component for Flex

If you're implementing PayPal Website Payments Pro Direct Payment in Flex, you're most likely going to need a ComboBox of country names and their ISO codes as expected by the PayPal API.

There's some freely available code for HTML but I couldn't find anything for Flex. It only took three find and replaces, however, to transform the HTML code into a lovely little Flex component. Here it is in hopes that it will save someone else the trouble in the future.

Screenshot of Paypal Country ComboBox

To use the PayPalCountryComboBox component, download and unzip it into the source folder of your Flex project. Then, just include it in your MXML as shown below.

Download the PayPalCountryComboBox (.zip, 8kb).