Unit 3 Lesson 9 and 10

Are you able to add text to a background image? I am not getting text to show. “stage” is one of the background scenes included in the animation library.

function draw() {
var wall = createSprite(200, 200);
wall.setAnimation(“stage”);
textSize(20);
text(“Animations Got Talent”, 30, 100);
var note1 = createSprite(250, 150);
note1.setAnimation(“halfNote”);
note1.rotation = randomNumber(-5, 5);
var character1 = createSprite(200, 300);
character1.setAnimation(“girl”);
character1.scale = 0.5;
character1.rotation = randomNumber(-5, 5);
character1.x = randomNumber(190, 210);

drawSprites();
}

@mrandall,

Just looking at the code, it appears that the drawSprites() is the last command and since stage is a sprite, it will draw it with all the other sprites at the end and that will cover up your text. You would want to create the text after drawing the sprites and then it would show up.

Hope that helps!

Mike

Thank you for the prompt response. That solved my issue.