We are about to switch to a new forum software. Until then we have removed the registration on this forum.
i've tried a project that when the light sensor doesn't take any light, 3 movies files play with the if+mouseover. but i dont know how to stop movies, when the light sensor take some light over certain amount. i want the black screen. not the pausing or go to first frame.
import processing.serial.*; import processing.video.*; Movie dali, inner, moon;
Serial port; int sec = 1000; int start_time=0; float a;
void setup() {
port=new Serial(this, Serial.list()[2],9600);
size(1024, 768); background(0);
dali = new Movie(this, "clock1.mov"); dali.loop(); inner = new Movie(this, "clock2.mov"); inner.loop(); moon = new Movie(this, "clock3.mov"); moon.loop(); } void movieEvent(Movie m) {
m.read(); }
void draw() {
int sensor = port.read(); if(sensor>200){ if(mouseX < width /3) { image(dali, 0, 0, width, height); } else if(mouseX < 2*width /3) { image(moon, 0, 0, width, height); } else { image(inner, 0, 0, width, height); }
}
one more, can i hide the mouse point?
i'm very new for processing. thank you for your reading.
Answers
If you want a black screen, then just put background(0); if your condition is true in draw() and else everything you have now. The mouse pointer may be hidden with noCursor();