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

SharedObject Methods

The SharedObject architecture has a powerful series of methods. Its only property, data, allows you to set ActionScript variable types including objects and arrays as slots. There will be more on the definition of a slot later. The most powerful component of the SharedObject, however, is the onSync method. This method is responsible for handling data-change messages used to synchronize all clients connected to the Remote SharedObject. Here is a brief overview of the SharedObject ActionScript. The details of these ActionScript items are presented within the exercises of this chapter.

.close()

This method closes the connection between the Flash client and the server. If the SharedObject is persistent, when the client reconnects, it receives synchronization events from an information object sent from the server. If the SharedObject is not persistent, and this is the only (or last) client connected, the object is deleted.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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