Back to Hyperstudio Newsletter

Using the Name It! Hyperstudio Stack

The Name It! stack is self-checking. Students identify an object and enter individual letters into boxes. When they click the checkmark, the stack checks their answer. If they are correct, a happy face appears and they are moved to the next card. If they are incorrect, a sad face appears, their incorrect answer disappears and they must enter a correct answer before moving on.

The stack is easy to use and change. The stack uses the Hyperlogo programming language to work. If you plan to use the stack, some basic knowledge of Hyperstudio is helpful. Use the directions below to explore the code. This stack is based on ideas in the Hyperlogo tutorial included with each copy of Hyperstudio.

To view the stack online, you'll need the free Hyperstudio plugin. You can also download the stack to view locally. If you don't own Hyperstudio (you should!) but you can get a free Hyperstudio player. Visit the Hyperstudio Download page.

View the Name It! Stack

Download the Stack (right click on the link and choose Download)

Stack Scripts:

Ariving At This Stack:

From the Object Menu, choose About This Stack. Double click the Arriving at this Stack box. Then double click the Use Hyperlogo box. The Hyperlogo script window will open. You will see the following code:

  ; Code used to check answers on a page related to button
TO checkAnswer :correctAnswer
LOCAL "userText
MAKE "userText GETFIELDTEXT [] "User\ Input
IF EQUALP :correctAnswer :userText [
SHOWITEM [] "happy "graphic
WAIT 120
MOVETOCARD MOVENEXT
HIDEITEM [] "happy "graphic
] [
SHOWITEM [] "sad "graphic
WAIT 120
HIDEITEM [] "sad "graphic
]
END

This is the code that checks the answers the user enters and decides whether to show a happy or sad graphic based on that answer. In addition, if the happy graphic appears, the user is automatically moved to the next card.

Leaving This Stack:

From the Object Menu, choose About This Stack. Double click the Leaving This Stack box. Then double click the Use Hyperlogo box. The Hyperlogo script window will open. You will see the following code:

  HIDEITEM [bell1] "happy "graphic
SETFIELDTEXT "bell1 "User\ Input "

This code makes sure that the happy graphic is hiddenwhen users open the stack and that the User Input field is emptied.

Card 1:

The title card does not include any scripts but has one button that allows the user to move forward into the stack.

Card 2:

Arriving At This Card Script:

From the Objects Menu, choose About this Card. Double click the Arriving At This Card box and them the User Hyperlogo box. You will see the following code:

SETACTIVEFIELD [] "User\ Input

This script makes sure the cursor goes to the correct box where students should enter answers.

Leaving This Card Script:

From the Objects

SETFIELDTEXT [] "User\ Input "
HIDEITEM [] "happy "graphic

This script makes sure the happy graphic gets hidden and that the User Input field is emptied.

Checkmark Script:

This script is attached to the checkmark graphic object. You can use any graphic object you like. In the Graphic Appearance dialog box, choose Action. Then choose Use Hyperlogo. You will see this code.

  ; pass correct answer to checkAnswer proc
checkAnswer "b

When users click the checkmark, this script is activated. The correct answer must be entered in the checkAnswer line. It can be a letter, number, word or phrase.

Other notes:

The textbox where the student enters the answer must be called User Input. You can set the font, size and color of the text that the student types. In order to keep them from typing in other boxes, they are made Read Only.

When you are in edit mode, you will see the sad face graphic. The happy face is directly underneath it. Neither appear in preview mode.

Following Cards:

The rest of the cards work the same way as Card 2. The cursor flashes in the correct box where students should type. All other text fields are Read Only.

The next button on the last card is currently set to return the user to the first card. Howev er, this could also be used to send the user to the next word.