hide side navigation
    5 most recent
    Web Services
    Library's
    Component's
    Applications
    Articles
  Flex form by email  Hello Remoting with AS3  AS3 Saving data from Flash  AS3 Loading data into Flash  Fire Effect  Contact form  Dragable buttons  Hello World with openamf  Loading helper classes  Upload with Flash 8  Transitions effects  Snapshot with Flash 8  Hello World Remoting AS2  Flash AS2 Remoting Connector  Saving data from Flash  Loading data into Flash  FlashCom & Remoting login  Cell Renderer API  Editing a table using remoting components  Flash MX2004 web service classes  Browsing a catalog  amfphp Documentation  Hello World Remoting  Online Store with AMFPHP  Flash clients for Web Services  Web Service Walk Though with NuSoap  Popup windows in flash with javascript  Installing Apache/PHP  MoreOver News Feeds  Load Edit Save Text Files via CGI  Save Movie Clip Postion via PHP and MySQL
 Read Full Documentation >> Untitled Document

Flash Remoting with AS3

By: Jorge Solis


Remoting and amfphp

If you don't know what Remoting is, probably you can read the introduction of AS2 tutorial . The short history is: a way of invoke RPC (Remote Procedure Calls) on server and share data in a binary format. Is the best structured and faster way to work when developing RIAs. Indeed, AS3 trough Flash and Flex opens new ways of sending data to and back, and this will be the focus of this tutorial.
Amfphp have been upgraded and now support AMF3 (Flex specs for amf) and it's easier to be installed, while it comes with a new service browser developed in Flex. If you compile your PHP library with a special C extension, parsing routine can become extremely fast and also your average, check this article. Client side is probably a little cumbersome due to strong typing in AS3, but was simplified with the use of NetConnection as the base class.

Requirements

- A server running PHP (easy to install bundled packets on apachefriends site) PHP 5+ needed for type checking on server side for VO examples
- amfphp 1.9 beta 2
- Flash 9 (Flash example) and Flex 2 Builder (Flex example)
- Charles for debugging

Relevant topics

This tutorial is divided into three little parts, and if you have some knowledge, you can skip the first simple example and go to VO example with Flash or Flex. Since many examples on using Flex with amfphp can be finded around there (even using advance techniques like mapping multiple data to class instances trough ArrayColection), not much on using Flash with the same features it's easy to find. Will be Flex the tool for heavy developers while Flash more oriented to design? I'm not totally agree, and as Flash fan will continue to use it as much as possible.
So our topics

1. Amfphp installation
2.
Debugging with Charles
2.
Basic example of loading/saving
3. Passing VOs to Remoting using Flash
4. Passing VOs to Remoting using Flex

 

Download examples files >>>

Ok, download the example files and continue with the first example