- Flash Multiplayer Virtual Worlds
- Makzan
- 204字
- 2021-08-03 15:29:10
Locating the Flash Client API
API is Application Programming Interface that allows other software to interact with it. Flash Client API for SmartFoxServer is the interface that allows Flash to connect to the SmartFoxServer and interact with it.
The following code snippet shows how Flash uses the client API to interact with SmartFoxServer.
Create an instance of client API object:
var client = new SmartFoxClient();
Connect the client to the SmartFoxServer with specific IP address and port number:
client.connect("127.0.0.1",9339);
The connection between the Flash client and the SmartFoxServer is established now. Next, we log in the user to the zone simpleChat
with the username John.
client.login("simpleChat","John","");
Send public messages to all users in the same room:
client.sendPublicMessage('Hello SmartFoxServer');
The Flash Client API is located in SmartFoxServer installation directory | Flash API. There are four directories inside it. They are ActionScript 2.0, ActionScript 3.0, RedBoxClient_AS2
, and RedBoxClient_AS3.
RedBoxClient is the client API for connecting the media streaming Red5 component that we will not use for the virtual world development now. What we will focus on is the ActionScript 3.0 client that is for SmartFoxServer. We will have a step-by-step example in the next chapter to set up our first Flash application to connect to SmartFoxServer.
- WordPress 2.7 Cookbook
- Creo 4.0中文版從入門到精通
- Animate 2022動畫制作:團體操隊形
- Authorware應用案例教程
- PPT 2016幻燈片設計與制作從入門到精通
- 3ds Max 2014從入門到精通
- CorelDRAW X5實用教程(第2版)
- Drools JBoss Rules 5.0 Developer's Guide
- PyTorch深度學習簡明實戰
- 圖像處理中的數學修煉(第2版)
- iPad+Procreate室內設計手繪表現技法
- 人人都能玩賺AI繪畫
- 三維建模與3D打印從入門到精通
- 中文版Illustrator 2020基礎教程
- 中文版Photoshop平面設計入門教程