• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

14. Real-World Application > 14.5. Flash Remoting Code

Flash Remoting Code

The ActionScript code used to contact the remote services is contained in several files described in the following sections. One caveat when working with Flash Remoting is that the remote calls are asynchronous. This creates problems when you’re trying to separate the logic in your applications, as discussed in Chapter 12. In our application, we decided to keep the logic simple by implementing the UI logic from within our responder objects. In other words, when a remote call returns a result, the responder object takes care of the details of updating the display.

RemotingInit.as

The RemotingInit.as file contains all of the Flash Remoting initialization code needed for the movie. The code is identical to the code you’ve seen throughout the book, but in this case we are creating three distinct service objects: one for the UserService, one for the ScriptService, and one for the SiteService. The code is shown in Example 14-7.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint