Scratch for Java

Sprite::removeBackdrop()

Remove a backdrop from the stage.

Examples

import org.openpatch.scratch.*;
 
public class StageRemoveBackdrop {
  public StageRemoveBackdrop() {
    Stage myStage = new Stage(600, 240);
    myStage.addBackdrop("forest", "assets/background_forest.png");
    myStage.addBackdrop("sea", "assets/background_sea.png");
    myStage.wait(2000);
    myStage.removeBackdrop("forest");
    myStage.wait(2000);
    myStage.exit();
  }
 
  public static void main(String[] args) {
    new StageRemoveBackdrop();
  }
}
 

View on GitHub

Syntax

Java

.removeBackdrop(name)

Scratch

remove backdrop (name)

Parameters

Name Data Type Description
name String Name of the backdrop

Return

void

removeBackdrop()