Player.IO is the next version of the Nonoba Developer Tools.

More Features, No Branding, Integrates with Everything. Read more »

Nonoba Multiplayer API: Clientside

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);
				}
			}
		}
	}	
}

Funkyball

funkyball.com is an independent gaming site where you can play both single- and multiplayer games for free.

Developer Tools

If you're a flash game developer, we've got some awesome tools to help you make even better games.

Great Games

Why not try some of the very best online flash games we've got, completely free?

Copyright ©2007-2012 Funkyball™ - All rights reserved.46.8ms on SERVER34096