Home
Project Folders
Teacher Resources
Student Resources
En ESPAÑOL
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

fortune telling ball 1 2 3 4
Fortune Telling Ball 4
Try It
80 KB


Goal:   Hide a list of questions and let the computer choose one to show and answer.


Screenshot


Vocabulary:   textpick, insert, hidetext, showtext

Code
Shapes
Project Map

to startup
questions, hidetext
text1, hidetext
opaque "text1
ct
setfont "Arial
setfontsize 14
settc 30
end

to ask_a_question
startup
text1, insert textpick "questions
transparent "text1
showtext
end

to shake
t1, repeat 10 [
      setsh "8-ball
      seth random 360
      fd 15 bk 15
      setsh "8-ball-t
      fd 15 bk 15
]
setsh pick [sure! of_course! please_ask_later totally! nope yes! no no_way right_on duh!]
end

to show_questions
questions, showtext
end

to hide_questions
questions, hidetext
end



Notes

Hidetext means, "Make this text box invisible."
Showtext means, "Make this text box visible."
(You can also make a text box visible or invisible by right-clicking on it or placing the eye tool on it and then checking or unchecking the "visible" box.)

This project uses an invisible text box called questions which has a lot of questions in a list.   You can use the buttons at the bottom of the page to show and hide the questions.   (It is more fun to keep them hidden, but you can show them to add more questions to the list.)

Text1, insert textpick "questions means: "Choose any line from questions (the invisible text box) and insert it into the text box named text1."
Note: You need to hit Enter (on PC) or Return (on Mac) after each question.   A "line" does not end until you do this, no matter how it looks.




What If?
Can you make the text box visible, add more questions to it, then hide it again?


Challenge
If you like, place your list of questions on another page and keep it visible at all times on that page.   Add a button to each page to make it easier to move from one page to the other and back again.




© copyright 2001 - 2008  OpenWorld Learning.   All rights reserved.