Hello, I am trying to add a play button and when I click on it it starts playing, and then when I click on it again it pauses and a pause button shows up. But I'm not sure what is wrong with my code. Thoughts?
if(Greenfoot.mouseClicked(this))
{
mySound.play();
}
else
{
if(mySound.isPlaying())
{
if(Greenfoot.mouseClicked(this))
{
mySound.pause();
setImage("Pause.png");
}
}
}
