Animations as background- Un. 3 Les. 22

I have a student who wants to use the space animation as a background. Is that possible and if so what code would she need to use?

Hi, @lschafer! Welcome to the forum. I clicked on the project and it looks like the space animation is effectively being used as the background, so she must have figured it out, but her code implementation looks great!

Let me know if I’m missing something, but she coded it and drew it first (making it the background of the project).

thanks!

Mike

When she puts the code for the score in it is not showing. Am I wrong in thinking it has to be placed next after the background but before the functions?

The score needs to be placed after the DrawSprites block because it has to draw the sprites including the background and then it puts the score on top of all of them. Also, her text block (line 39) needs to have the " " removed as that tells the computer to type the word “score” and not the value of the variable.

Best wishes!

Mike

1 Like

I hadn’t even thought about the quotation marks being an issue! Thank you!

It still isn’t showing up so we must have something else wrong.

It still looks like the score is being drawn before the sprites. Move the “ShowScore” function (line 27) below the drawSprites (line 32) block and that should fix it.

Mike

1 Like