Text in interactive card

Student is trying to do a couple different things with text and for some reason I am struggling with this.

She woudl like the text “Click on the heart to see a surprise” to disappear when you click on the heart.

Then, when you click on the spacebar, she would like “Happy Valentine’s Day” to stay there without having to hold the spacebar down.

Are these things possible?


It’s a little tricky since the text isn’t a sprite. What I did was create a variable at the beginning called “textVisible” I set it equal to 1. Then, in the same place where the heart gets changed to a corgi, I set the textVisible to 0. Then in the block of code where you print the text, I just put that into a conditional block so the text will only display when “textVisible” ==1.

You could do something similar with the Happy Valentine’s Day text as well, so the space bar going down would change a variable from false (0) to be true (1) and the text would constantly display when the variable was true.

Give it a shot and if you can’t get it to work, we can try to assist further!


My student asked me this yesterday and he had a great solution. He changed the text size to 0 to make it not visible. Brilliant! Worked great!

Yes! That’s another good way to do it!


1 Like