Though I'd continue my work on the unit converter, add a few more conversions (Volume, Weight & Mass and everybody's favourite – Computer Units are now available). But the thing I really wanted to add was a currency conversion. This turned out to be more trouble than I had originally anticipated. Mainly due to the lack of documentation available about utilising web services with actionscript. I didn't want to use an mxml component (which there was a fair bit of documentation for), so hunted for an hour or so yesterday, and another hour today before finding the following: http://jeff.mxdj.com/as3_datamanager.htm. Love your work Jeff!
Before you check out the example, please note that I am still tracking down security sandbox issues when accessing the swf online. The web service loads fine locally, but the security sandbox in flash causes the queries to to the web service to never return! I'm pulling my hair out trying to debug this – I've got a crossdomain.xml file setup (though do I need this or does the webservice need it?), I've tried Security.allowdomain() and nothing's allowing me to use the currency conversion service remotely. Hopefully someone out there can view the source in the example and let me know what I need to do. I've posted the issues I'm having here and here.
Here's version 2 of the unit converter (please note that you'll need to run the example locally until I can sort out the security issues I'm having as mentioned above)
I'm not sure how often the xmethods webservice I'm using is updated, but the results are returned very quickly… so lookout xe.com here I come!!!
I'd like to format the numbers now to reflect the currency chosen, which I'll detail in my next post.