Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

File Savings With Flash MX Pro Web Service Classes

Aug 02

As you’re most likely aware, the new MM V2 components are great but they are a bit bulky. Don’t get me wrong, I’m not complaining because I use them all the time….but, they do introduce a good bit of overhead when using them in applications. So this is just a quick note you might aready know but it provides a 15kB file savings when using Web Services.

I’ve been using the WebServiceConnector component but coding all my service calls and callbacks. So, in it’s simplest form they look like this:

import mx.services.*;
var ws:WebService = new WebService(“http://url/service?wsdl”);
var wsResult:PendingCall = ws.getData();

wsResult.onResult = function(re:ResultEvent):Void {
// data returned successfully
}

wsResult.onFault = function(fe:FaultEvent):Void {
// error retrieving data
}

It turns out they I can just import the WebServiceClasses since I don’t need the functionality of the WebServiceConnector component. The WebServiceConnector component adds about 40kB to your application while the classes add only 25kB. If you want to add just the classes then go to:

Window > Other Panels > Common Libraries > Classes

Every little bit helps!