Hello World

A simple Hello World example that shows how to use the basic EventHandlers tag, how to call a service using RemoteObject and how to use the CallBack tag. If you write "microsoft" instead of your name, you will see how the server faults are handled. It uses mock services to simulate Flash Remoting, but it also includes a ColdFusion service as an example. To use it, you'll need to uncomment the actual RemoteObject tag in the Services.mxml file. cfcs should be placed in a folder off the root called "helloworld". If you wish to change that path, you can make the change in the RemoteObjectInvoker inside the MainEventMap.mxml file.

To use other type of server side technology, simply change the RemoteObject to match your endpoint and other configuration options. Your service should have a method called "sayHello" which should accept a string. It should return a typed object (class Message) which has a "text" property.

To compile with the mock services, you need to add the folder "mock" to your build path.

Run Example

View Source

Download Source

12 responses so far

  1. Thank you for all the examples.
    I wish they didn't rely upon ColdFusion though ... or at least have a PHP version available too.
  2. Hi,thank you for all the examples.
    But the demo"Hello world:" can't put in Chinese.

Leave a Reply

Leave this field empty