We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsWebsite,  Documentation,  Book Bugs › mouseDragged only fires when noLoop is on
Page Index Toggle Pages: 1
mouseDragged only fires when noLoop is on (Read 927 times)
mouseDragged only fires when noLoop is on
May 6th, 2006, 11:16am
 
hello,

I was just toying around, and found, that mouseDragged() and mousePressed() do not fire, while the sketch loops. calling noLoop() in setup fixes that for me. the noLoop manpage suggests that it can also be called from inside a mousePressed handler - I did not bother to check. Please make the mouseDragged() and mousePressed() manpages tell users about that (cross reference to noLoop() at least).

thank you for the fun processing toy and tool!

peter
Re: mouseDragged only fires when noLoop is on
Reply #1 - May 6th, 2006, 11:59am
 
can you post your code please?

F
Re: mouseDragged only fires when noLoop is on
Reply #2 - May 6th, 2006, 12:07pm
 
Code:
float value = 100;

void setup () {
size( 200, 200 );
framerate( 15 );
}

void draw() {
background( 125 );
fill( value );
rect( random( 0,width-50) , random( 0,height-50), 50, 50);
}

void mousePressed()
{
value = random( 100, 200 );
println( "mousePressed()");
}


Reference

works perfectly for me ...

F
Re: mouseDragged only fires when noLoop is on
Reply #3 - May 8th, 2006, 12:25pm
 
Hrmm,

I cannot reproduce the behaviour I mentioned - Must have made a stupid mistake. It actually works as advertised.

Thank you.

Peter
Page Index Toggle Pages: 1