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();
}
}
Syntax
Java
.removeBackdrop(name)
Scratch
Parameters
Name | Data Type | Description |
---|---|---|
name | String | Name of the backdrop |
Return
void