SWX and SWX RPC work in Flash Lite 2.0 and 2.1. In fact, SWX RPC is the only RPC solution for Flash Lite since Flash Remoting is not supported on Flash Lite. With its low processor overhead and native support in Flash, SWX is the ideal data format for mobile applications with Flash Lite.
Check out the MiniFlickr sample application that comes with SWX PHP for an example of how to build data-driven Flash Lite applications using SWX.
Keep in mind that, due to a bug in Flash Lite, you cannot make POST requests in a
loadMovie call. Instead, you must make GET requests when using SWX RPC with Flash Lite. For more information on this, see the Mobile Limitations section, below.
The MiniFlickr application makes use of the
LoadManager classes that come with SWX AS to queue all load requests (data and assets such as images). This is essential in mobile development as most handsets will fail if you try to load two things at once. The SWX AS Full API handles the queueing of requests for you and gives you a general purpose load queue that you can use in your own applications. Make sure you study the MiniFlickr sample if you want to create Flash Lite applications using SWX PHP.
SWX RPC is the only RPC solution for Flash Lite and, beyond that, it works really well and is simple to use. Here is a summary of some of the advantages of the SWX data format and SWX RPC for Flash Lite development:
- Native; data is ready to use the moment it loads as native ActionScript objects.
- No processor-intensive parsing, etc.
- No plumbing code for deserializing requests.
- Public gateway and APIs for mobile mashups.
- Only RPC solution for Flash Lite.
- Easy to understand and use.