Example name: Basic Flex Remoting Invocation using RemoteObject MXML
Description: The example demonstrates the following:
  • Declaration of the RemoteObject MXML tag
  • Registration of invocation result and fault handlers
  • Invocation of a remote method in a PHP class
  • Response and error handling
Client-side code: Browse  Download
Server-side code: Browse  Download
Run example:
Key points:
  • The example uses RemoteObject MXML tag to declare a reference to a remote PHP class
  • This example uses 'GenericDestination' as the destination for the RemoteObject. GenericDestination requires the 'source' attribute to contain the name of the class to invoke.
  • The example sends three primitive values as arguments for the method invocation and receives a primitive value (integer) back.
  • The client code sends arguments as String values, but the server side signatures accepts integers.
Things to try:
  • Try to invoke the method with no values in the arguments
  • Try to enter a non numeric value in the text fields
  • Select division operator, enter zero for the second argument and click the button to invoke
  • Explore example's source code (click Browse or right-mouse click and select View Source)