Scratch for Java

Stage::removeSound()

Removes a sound.

Examples

import org.openpatch.scratch.*;
 
public class StageRemoveSound {
 
  public StageRemoveSound() {
    Stage myStage = new Stage(600, 240);
    myStage.addSound("bump", "assets/bump.wav");
    myStage.removeSound("bump");
    myStage.exit();
  }
 
  public static void main(String[] args) {
    new StageRemoveSound();
  }
}
 

View on GitHub

Syntax

Java

.removeSound(name)

Scratch

remove sound (name)

Parameters

Name Data Type Description
name String The name of the sound to remove

Return

void

removeSound()