Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Introducing JavaScript Finishing the Game Adding Animated Characters

Daniel Sanchez
Daniel Sanchez
Courses Plus Student 1,136 Points

Hey the star spirte does not appear right when i input star.png. instead a greeen box appears. How do I fix this?

In the Adding Animated Characters video, I put the poison bottles but when i add the star to the workspace, it appears as a green and black box. What am I doing wrong? I also tried putting in .png but the same thing comes up. Thanks

1 Answer

Michael Pashkov
Michael Pashkov
22,024 Points

Did you add star here too? line is approximately 91 //Load spritesheets

game.load.spritesheet('player', 'chalkers.png', 48, 62);
game.load.spritesheet('coin', 'coin.png', 36, 44);
game.load.spritesheet('badge', 'badge.png', 42, 54);
game.load.spritesheet('poison', 'poison.png', 32, 32);
game.load.spritesheet('star', 'star.png', 32, 32);


Daniel Sanchez
Daniel Sanchez
Courses Plus Student 1,136 Points

I figured it out right as you sent me the answer lol thanks!