Scratch for Java

Sprite::goToBackLayer()

Puts the sprite in the back.

Examples

import org.openpatch.scratch.*;
 
public class SpriteGoToBackLayer {
  public SpriteGoToBackLayer() {
    Stage myStage = new Stage(600, 240);
 
    Sprite gamma = new Sprite("gamma", "assets/gamma_purple_badge.png");
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(new Sprite("zeta", "assets/zeta_green_badge.png"));
    myStage.add(gamma);
 
    myStage.wait(1000);
    gamma.goToBackLayer();
    myStage.wait(1000);
    myStage.exit();
  }
 
  public static void main(String[] args) {
    new SpriteGoToBackLayer();
  }
}
 

View on GitHub

Syntax

Java

.goToBackLayer()

Scratch

go to [back v] layer

Return

void

goToBackLayer()