pageBody What is XML-RPC? XML-RPC is a standard that was developed for calling remote procedures, usually over http, that can return data to the client. It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet. It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned. - xmlrpc.com
What the hell does that mean and why do I care about it in Flash? Excellent question. Ever write a php/asp/jhtml/perl script to output a bunch of XML? Then write another script in Flash to parse the XML and create an array or a bunch of objects? If so, then you know that it is nothing but a waste of time and an annoying exercise which needs to be repeated each and everytime you wish to retrieve a different set of data from your web server. Well, imagine a world where you simply call the remote method located on your webserver from Flash. Then, Flash is given the returned data from that method - transparently, without writing any scripts to create or parse XML. Welcome to XML-RPC for Flash. Here's a diagram of how it works:








That's amazing, gimme gimme! Ok, calm down. Don't you want to see some sample code first? Just to make sure implementing it isn't a complete pain in the ass? import XMLRPC.Connection; var rpc:Connection = Connection('http://www.myserver.com/rpc'); rpc.onLoad = function( menu:Array ){ trace(”My menu has “ + menu.length + ” items.“); } rpc.getMenu();
Download


Extra

]]>
footer Home | Contact | Sourceforge | OSFlash.org ]]>