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

Parameters

NameData TypeDescription
nameStringThe name of the sound to remove

Return

void