Flex 2 Unit Converter – Part II

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.

Please follow and like us:

2 thoughts on “Flex 2 Unit Converter – Part II”

  1. You should definitely make this converter into an AIR app. I would use it, especially the currency tab.

    Nice to see you have New Zealand Dollars there, im a Kiwi myself.

    Nice work, keep it up.

    Reply
  2. G’day (I am Auusie), I found your page when searching Google for unit conversions. I started with unit converter pages, would you please be interested in placing my website’s link (code below) on your page. It’s a new website but I am serious a lot about it. With compliments and anticipation.


    Convert To dot com

    Reply

Leave a Reply to Adam Cancel reply