Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

music file play

$
0
0

Hi, have the following problem. I have a tank, that is controlled by the keys. I have found the sound of an engine roaring. BUT, I want it to be played ONLY if the key is pressed.

If I code: If (mouseClicked == true) then mySound.play

Then the sound will be played from the start every time I click the mouse button. What is the right way to do this?


Viewing all articles
Browse latest Browse all 2896

Trending Articles