FMS3 Series (vi): Multi-person Live online chat using remote shared objects

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.