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

Chapter 8. Shared Objects > Proxied Shared Objects

8.6. Proxied Shared Objects

Every shared object belongs to one application instance. The master instance, also called the home instance, is the only one that can use Server-Side ActionScript to lock a shared object. However, other application instances can access a shared object belonging to a master instance using a network connection. The process of connecting to another instance in order to access its shared object is very much like the process used by a Flash movie to connect to an instance's shared objects.

One instance uses a NetConnection object to connect to the master instance. Then it creates a SharedObject and connects it to a shared object in the master instance. Once synchronization takes place, it can get and set data in the shared object belonging to the master instance. Many instances can connect to the master instance and update the master's shared objects. Figure 8-1 shows two instances—named chatApp/room2 and chatApp/room1—connected to a master instance named chatApp/_definst_. The master instance contains one shared object with a relative URI of private/roomList. The other two instances have connected to the master instance and to its private/roomList shared object.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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