In FMS development, shared objects are often used to synchronize users and store data. For the realization of broadcast text information to achieve chat support is very strong, but also can track the user's time and action, in the development of Flash multiplayer online game application is also very broad.
When developing shared objects using FMS, you need to be aware that you can create and use remote shared objects only if you use the two versions of Flash media Interactive server or Flash media Development server. To implement shared data between multiple-client applications. If you are using the Flash Media Streaming server version of FMS, you cannot create a remote shared object, you can create only local shared objects, similar to cookies in traditional web development.
Using Shared Objects (Sharedobject) to develop text chat is actually very simple, sharedobject can track and broadcast messages, connect to sharedobject any one of the clients to change the data in the Sharedobject, Sharedobject will broadcast the latest data to all the clients connected to it. From a certain point of view, the remote Sharedobject is a network center that synchronizes many users. The following figure is the official Sharedobject broadcast message diagram:
This paper introduces the use of remote shared objects in FMS by implementing a simple text chat, first establishing the application name in FMS, establishing a folder under the applications of the FMS installation directory to use as a shared object application, as shown in the following figure:
As pictured above, Sharedobjectapp is a FMS application folder for the realization of chat, under Sharedobjects/_definse_ directories that are automatically generated after a remote object is successfully created. If you create a permanent remote shared object, there will also be a remote shared object file with the. fso extension in the directory.