Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Thursday, July 17, 2008

AS3 Webservice Example

Thursday, July 17, 2008   


I found this set of AS3 Webservices classes and it's a pretty nice implementation. Above is a screen shot of a quick example I whipped up that utilizes the classes. I am not using a .swc or installed components, rather using the classes themselves in a document class.

One thing I had to do is get around the returned result object returning as something I couldn't cast to XML, but rather it's an object with properties. 

So I relied on the AS2-ish way of pulling out the properties of the main object and the detail objects it contained (in relation to the weather webservice). 

Once you snag the code, you can see how I implemented in this class file (Weather.as) that was quickly written, but again, is shown in the screen shot above. I like this set of classes, and may work on refining how the internals work a little bit. 

If you miss the MX2004 Webservice stuff, give these a go if you're into AS3. And I hope that you are by now.
 
 Return to the main page
Comments:

There are currently 1 Comments:

Blogger Tony said...
“I snagged the code from SVN and am taking a look at this now. I am building a front end for my home weather station and using webservices to allow other web based items to get at the data. Will give this a go for parsing said services.

AND....

'AS2-ish' needs to be added to the english dictionary.

Cheers,

Tony”
 
 Leave a comment