topical media & game development

talk show tell print

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



  PrintWriter output;
  void setup() {
    output = createWriter("positions.txt");
    size(300,300);
  }
  void draw() {
  }
  void mouseDragged(){
    point(mouseX, mouseY);
    output.println(mouseX + "," + mouseY + "\r");
  }
  void keyPressed() {
    output.flush();
    output.close(); // Closes the file
  }
  


(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.