stop();
import it.gotoandplay.smartfoxserver.*;
import it.gotoandplay.smartfoxserver.data.*;
var sfs:SmartFoxClient = new SmartFoxClient();
//load config file
sfs.addEventListener(SFSEvent.onConfigLoadSuccess, onConfigLoadSuccessHandler);
sfs.addEventListener(SFSEvent.onConfigLoadFailure, onConfigLoadFailureHandler);
sfs.addEventListener(SFSEvent.onRoomListUpdate,onRoomListUpdate);
sfs.loadConfig("config.xml", false);
msg.text="";
function onConfigLoadSuccessHandler(evt:SFSEvent):void
{
msg.text = "Config file loaded, now connected...";
sfs.connect(sfs.ipAddress, sfs.port);
gotoAndStop("cRoom", "Scene 1");
}
function onConfigLoadFailureHandler(evt:SFSEvent):void
{
msg.text = "Failed loading config file: " + evt.params.message;
}
function onRoomListUpdate(e:SFSEvent):void
{
sfs.autoJoin();
}
Cartman
-
doodle of the evil brat from colorado i made a few days ago Attachment
75990 (https://board.flashkit.com/board/attachment.php?attachmentid=75990)
6 days ago
0 comments:
Post a Comment