Archive for September, 2006

06
Sep

Flex 2 Unit Converter - Part III

Ok, the plot continues to thicken on the Flex front. I've been pulling my hair out trying to the get the previous example to work when viewing it on the web and up to about a minute ago I was having no luck.

So I thought I'd finally upgrade my flash player in IE (yes, I was waiting for it to auto update itself, but it seems Adobe [for whatever reason] haven't flicked the switch on the auto update mechanism) and lo and behold there is no security sandbox violation runtime error and the webservice correctly returns a result!

AHHHHHHH!!!!

It seems that the Debugging version of the player (the one I've got installed in Firefox and have been testing the converter in) isn't working properly with the Flash Security Sandbox. Very odd indeed….

Can anyone confirm that the currency converter is actually working for them in the debug version of Flash Player 9?

EDIT: I just installed the non-debug Flash Player 9.0.16 for Firefox, and the example still doesn't load the webservice! Even though, using IE and the same Flash Player version works! It's funny little things like this that really cause me to loose faith in Flash sometimes… hopefully someone out there can help "keep the faith" ;-)

EDIT 2: I have just submitted a bug report to the Mothership… hopefully someone can help me out further with this cross browser odditity.

05
Sep

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 think 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.







Categories