The function will stop any sounds currently being played on all sprites and the Stage. Pressing the Stop button will also stop all sounds, but is rarely used as it also stops all the other scripts running in the project.
The example demonstrates how to make the sprite track and stamp its image on the mouse when the space key is pressed in Python.
Code
sprite = Sprite('Tobi')
pen = Pen()
pen.clear()
while True:
if (sprite.iskeypressed("space")):
sprite.setx(sprite.mousex())
sprite.sety(sprite.mousey())
pen.stamp()