Friday, July 6, 2012


In the grade 10 PAT it is mentioned that the player might have to be able to get hints or information somewhere.  In last week's post, I had a help button that the user can click to get information about the planets.

When you click on this help button, the library is displayed:

The books on the shelf are separate sprites.  When you click on any book, a paragraph of information will appear in a another sprite.  This content sprite has a different costume for each book and simply changes costume when a different book is clicked:

The code for each book is as follows:
Remember, the book sprite cannot change the costume of the content sprite and has to broadcast a message so that the content sprite can respond by switching costumes.

The code for the content sprite is as follows:

No comments:

Post a Comment