We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there, I'm trying to get a short popping noise to play on every 8 clicks of the mouse, at the moment it will only play once, what am I doing wrong?
code:
void mouseClicked() { //----------THIS IS WHERE MY PARTICLES ARE SPAWNED IN ON MOUSE CLICK------------
listW.add ( new Walker () );
clicks += 1;
if(clicks == 8) {
listD.add (new Diamond () );
snip.play();
clicks = 0;
}
}
Answers
For questions like these, you need to consult the API. Assuming you're talking about minim here (you haven't actually told us what type of Object snip is), the API is here: http://code.compartmental.net/minim/javadoc/
Find the type of Object snip is, find the play() method, and read exactly what it does. Then consult the API for other useful functions that might help fix your problem.
Problem solved, thanks!
If you could share the solution would be nice, for the records : )
Sure, this is what my code looks like now.
thanks