topical media & game development

talk show tell print

graphic-processing-algorithm-Ch10-p269-p269.pde / pde



  import processing.net.*; //get the net library
  Server MyServer; //define a server
  void setup(){
    size(300,300);
    MyServer = new Server(this, 5200);
  }
  void draw(){
    point(mouseX,mouseY); //draw a point
    MyServer.write(mouseX); //send x
    MyServer.write(mouseY); //send y
  }
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.