Difference between revisions of "Server-monitor.as"

From Organic Design wiki
(reorder)
(remove duplicate code)
Line 6: Line 6:
 
#include "bar-graph.as"
 
#include "bar-graph.as"
  
//createSymbol( this, 'barGraph', 'myGraph', 0 );
+
createSymbol( this, 'barGraph', 'myGraph', 0 );
  
// Connect to our host to establish stream
+
function reduce() {
if ( socket.connect( 'organicdesign.co.nz', 1729 ) ) echo( 'Connecting...', '00ff00' );
+
    myGraph.rotate( Math.sin( ++x/10 ) * height / 3 + height / 2 );
else echo( 'Could not initialise connection!', 'ff0000' );
+
    }
 
 
 
 
//function reduce() {
 
//    myGraph.rotate( Math.sin( ++x/10 ) * height / 3 + height / 2 );
 
//    }
 

Revision as of 05:41, 27 March 2006

  1. include "debug.as"

echo( 'Begin: Hello world!', 'ff0000' );

  1. include "peer-socket.as"
  2. include "bar-graph.as"

createSymbol( this, 'barGraph', 'myGraph', 0 );

function reduce() {

   myGraph.rotate( Math.sin( ++x/10 ) * height / 3 + height / 2 );
   }