The clientside is the part the users download to their computer. When making games using the Nonoba Multiplayer API the client side is simply your flash file. Note here that Nonoba does not support uploading of external files for your games, so its important that you embed all the resources required for your game to run into the flash file.
To turn your flash game into a multiplayer game you need to import the Nonoba classes that make up the clientside API, and call an init method in the constructor of your main game class. It is very important that the API is initialized before anything else. Here's a sample class for a multiplayer game:
package {
import flash.display.MovieClip
import flash.events.Event
import Nonoba.api.*
public class MyGame extends MovieClip{
private var connection:Connection
function MyGame(){
stop();
connection = NonobaAPI.MakeMultiplayer(stage);
connection.addEventListener(MessageEvent.MESSAGE, onMessage);
connection.addEventListener(ConnectionEvent.DISCONNECT, function(e){
gotoAndStop("error");
})
connection.Send("hello");
}
private function onMessage(e:Object){
var message:Object = e.message;
switch(message.Type){
case "hi":{
trace("Got response from server on hello message");
break;
}
case "welcometogame":{
trace("Got welcome! - There are " + message.GetInt(0) + " other users in the game");
break;
}
default:{
trace("Got unhandled message > " + message);
}
}
}
}
}