Random numbers with MobileProcessing

Nikolaus Gradwohl2009-01-25T08:14:00+00:00

I wrote my first sketch in MobileProcessing. MobileProcessing is a processing dialect, that can be used to write apps for java-capable mobile phones.

The application can be used to generate random numbers. every key-event shows a new random number.

/**
  a random number generator by
  <a href="https://www.local-guru.net/blog">Guru</a>
*/

PFont font;
int rnd = 0;

void setup() {  
  font = loadFont( FACE_PROPORTIONAL, STYLE_PLAIN, SIZE_LARGE );
  textFont( font );
  textAlign( CENTER );
  fill(0);
  rnd = random(0,100000);
  noLoop();
}

void draw() {
  background(255);
  text( "\n\n\n"+rnd, 0, 0, width, height );
}

void keyPressed() {
  rnd = random(0,100000);
  redraw();
}
Tweet This! submit to reddit Digg! Tags: | no comments | no trackbacks

See also:

Two Minute Timer in mobile.processing
qr-code midlet installer
sketch experiment 7 - osc events
nested cubes in processing
processing phaseflower

Trackbacks

Comments

Leave a response

Leave a comment