Using the SWX Data Analyzer to confirm that your SWX data is loading correctly into Flash is great, but what you really want to do is display that data in Flash. You're going to implement a quick hack to get it working and we can evolve the application later to improve it.
Add a TextField instance to the Stage and give it the instance name status.
Next, create an onEnterFrame handler that prints out the value of the result property of the dataHolder movie clip into the status text field.
The complete script at this point is shown below:
dataHolder.serviceClass = "Calculator";
dataHolder.method = "addNumbers";
dataHolder.args = "[35, 7]";
dataHolder.debug = true;
dataHolder.loadMovie("http://localhost:8888/php/swx.php", "GET");
function onEnterFrame()
{
status.text = dataHolder.result;
}
Test the movie and you should see the number 42 appear in the status text field.
Now stop for a moment and take a deep breath: You now know exactly how SWX RPC works!
You didn't import any classes, you aren't using an API, you didn't include any external code whatsoever. SWX is completely native to the Flash platform and, if you want to, you can make use of it by using only built-in Flash features like you did here.
Compare this to other technologies like Flash Remoting. Do you actually know exactly how Flash Remoting works? There are numerous classes, lots of code, etc. There's some magic involved that you don't really understand. Not so with SWX RPC. With SWX RPC, your data arrives in native Flash format.
It's important for a technology to be so simple that you can actually conceptualize it completely. However, that doesn't mean that the above method is the way you'd want to use SWX PHP on a daily basis.
For one thing, take a look at how you set the arguments. You placed them in a string. In fact, what you did was serialize the arguments you're sending in JSON format. It's not confusing or difficult to this by hand if you are sending simple arguments like two numbers but what if you wanted to send an array of complex objects to the server? It would get tiresome and impractical very quickly.
The example you just created uses the No API method. In other words, you used pure Flash. No additional classes.
However, to make your life easier, you may want to use just a little API. Specifically, a method to serialize your arguments into JSON format for you would be nice. The SWX ActionScript Library, which comes with SWX PHP, provides just such a method for you (and much, much more!)