Search JavaScript code of all Worlds for: AB socket
AB.socketStart(); // Starts web sockets if(AB.socket) // If the socket has loaded & connected if(AB.socket.connected) AB.socketOut(data); // Sends players boats positioning, current players score & turn if(AB.socket)
AB.socketStart(); // Calls the socket start function
AB.socketOut({
AB.socketUserlist = function (e) { // Function to handle socket user list
host = AB.socket.id; // Sets the host to the socket id
AB.socketIn = function (element) {AB.socketStart(); AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World // --- re-define AB socket handler functions ------------------------------------- // When someone else enters text, server will trigger AB.socketIn. AB.socketIn = function(data)
Object.defineProperty(AB, "socket", {
Object.defineProperty(AB, "socket", { value: v });
AB.socketOut ({
AB.socketOut ({
AB.socketOut ({AB.socketStart ( password );
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other playerAB.socketStart();
if ( AB.socket.connected ) $("#out").html ( "<p style='color:green; font-weight:bold;'> Websocket server up </p>" );AB.newSplash() // sends out time to socketout and calls the game to be over
AB.socketOut({
AB.socket.destroy();
AB.socketStart();
AB.socketIn = function(element)AB.socketStart(); AB.socketOut ( data ); AB.socketIn = function(data) AB.socketUserlist = function ( a ) AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
AB.socketStart();
if(AB.socket){ //if the socket is open
if(AB.socket.connected){ //and if the socket is connected
AB.socketOut(p1score); //send the score to the server
AB.socketIn = function (s){ //AB.socketStart(); // start sockets AB.socketIn = function(data) // incoming data on socket, i.e. key movements of other players AB.socketOut(data);
AB.socketStart ( password );
function cj() { changeBox(2); AB.socketOut (2); }
function bigsmoke() { changeBox(3); AB.socketOut (3); }
function ryder() { changeBox(4); AB.socketOut (4); }
function sweet() { changeBox(5); AB.socketOut (5); }AB.socketStart();
function Goku() { changeBall(7); AB.socketOut (7); }
function Vegeta() { changeBall(8); AB.socketOut (8); }
function Gohan() { changeBall(9); AB.socketOut (9); }
function Piccolo() { changeBall(10); AB.socketOut (10); }// use AB library for WebSocket Communication
AB.socketOut(hats); // send update for number of hats caught to the other user's world
AB.socketUserlist = function ( array ){
AB.socketIn = function ( data ){
AB.socketOut("captured"); // the user running the game has been captured, alert other userAB.socketStart();
function pink() { changeBox(1); AB.socketOut (1); }
function blue() { changeBox(2); AB.socketOut (2); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other playerAB.socketStart ( password ); AB.socketUserlist = function ( a ) // when told users I am sharing with AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World with this password AB.socketIn = function(data)
AB.socketStart(); AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World // --- re-define AB socket handler functions ------------------------------------- // When someone else enters text, server will trigger AB.socketIn. AB.socketIn = function(data)
AB.socketStart();
if(AB.socket){
if(AB.socket.connected){
AB.socketOut(p1score);
if(AB.socket){AB.socketOut({
AB.socketStart();
AB.socketIn = function ({ id, payload }) {
AB.socketUserlist = function (users) {AB.socketUserlist = function (a) AB.socketStart(); AB.socketIn = function(score) if (AB.socket) if (AB.socket.connected)
AB.socketStart(); if ( AB.socket ) if (AB.socket.connected) AB.socketOut (data); // Sends the data to the other clients. AB.socketUserlist = function(userList)
window.onbeforeunload = function () {AB.socket.destroy();}
AB.socketStart();
AB.socketOut({ event: "restart" });
AB.socketOut({ event: "gameFinished", score: getScore(), username: AB.myuserid });
AB.socketOut({ event: "restart", username: AB.myuserid })AB.socketStart(); AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World AB.socketIn = function(data)
if (AB.socket) {
if (AB.socket.connected) {
if(AB.socket)
if(AB.socket.connected)
AB.socketOut(lives)AB.socketOut("Start"); // send out start command to all worlds so they remove the splash
AB.socketStart(); // start sockets
AB.socketIn = function(data) // incoming data on socket, i.e. clicks of other player
AB.socketOut(data);AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other playerAB.socketStart(); AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World AB.socketIn = function(data)
AB.socketStart(); // start sockets AB.socketIn = function(data) // incoming data on socket, i.e. key movements of other players AB.socketOut(data);
AB.socketStart(); AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World // --- re-define AB socket handler functions ------------------------------------- // When someone else enters text, server will trigger AB.socketIn. AB.socketIn = function(data)
AB.socketStart();
function red() { changeBox(5); AB.socketOut (5); }
function yellow() { changeBox(6); AB.socketOut (6); }
function blue() { changeBox(7); AB.socketOut (7); }
function green() { changeBox(8); AB.socketOut (8); }AB.socketStart(); AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World // --- re-define AB socket handler functions ------------------------------------- // When someone else enters text, server will trigger AB.socketIn. AB.socketIn = function(data)
AB.socketStart();
if(AB.socket){
if(AB.socket.connected){
AB.socketOut(num_fire_p1)
AB.socketIN = function(num_fire_p1){AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other playerAB.socketStart ( password ); AB.socketUserlist = function ( a ) // when told users I am sharing with AB.socketOut(messageData); // server gets this, and sends the data to all clients running this World // --- re-define AB socket handler functions ------------------------------------- // When someone else enters text, server will trigger AB.socketIn.
AB.socketIn=function(o){m=o},AB.socket&&AB.socket.connected&&AB.socketOut(h)}var u=document.getElementById("ab-threepageAB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other playerAB.socketStart ( password ); AB.socketIn = function(data) AB.socketStart();
AB.socketStart(); AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World AB.socketIn = function(data)
AB.socketOut(data); AB.socketStart(); AB.socketIn = function(data) // incoming data on socket, i.e. clicks of other player
AB.socketOut({ "name": "lightChange", "data": { "redOn": true, "actualChange": actualChange } });
AB.socketOut({ "name": "lightChange", "data": { "redOn": false, "actualChange": actualChange } });
AB.socketOut({ "name": "finishLineCrossed", "data": { "runTime" : runTime } });
AB.socketStart(); // start the socket connection
AB.socketUserlist = function (array) {