Text and Background Sprites

csd-unit-3

#1

Is there a way to have text appear on top of a background sprite?


#2

Hello @bross,

I think the order of code might be the issue. Take a look at this sample project.

Would you be able to share a link to the project you’re having issues with?

thanks!
Kevin


#3

#4

Dawn,

Just two minor issues with the code you shared:

1.) the .setAnimation block should be done outside of the draw loop if you aren’t changing the animation - in your case, you aren’t because it’s the background.

2.) Since the text is on top of the sprite, you need to drawSprites first and then have your fill, stroke, size, and text afterwards.

Hope that helps!
Brad


#5

Thanks so much. I just knew there had to be a way!!