This applet lets kids post their own MadLibs (© by Price Stern Sloan) and try out other kids stories. I wrote this to put on a local elementary school site. Here are some of the kids stories from that school.
The applet requires that you set things
up in an exact way but can be done with any text editor or word processor.
First,
let's
look
at
the
applet
tag,
just as it is in the HTML of this page:
<applet code="MadLib.class" width="500" height="500"
param name="user" value=""
param name="classroom" value=""
param name="author" value=""
></applet>
You may be wondering what the empty params are. These are optional items
that allow you to customize aspects of the applet. The "user" param
is where you enter a code to register the applet. If you click "About Mad
Adlibs" button you will see that it says "Not licensed" on the
second line. If you would like it to show your name, just email me and I will
send you a code to put in the value"" to show your name. It's free
and I don't give your email address to anyone. It's just a way for me to keep
track of where the program is being used. Here's what it looks like
for me:
param name="user" value="(rm>g5ahn">
Notice that step 1) reads "Choose a classroom". This may
not be the most appropriate cue for your situation. If you want to change it,
put
something in the "classroom" param value, for instance:
param name="classroom" value="Select category"
Likewise, you can change step 2) by entering a value into the "author" param
Now on to the mechanics of constructing the stories. This is a little
complex and must be done exactly. First, all files must be text files and
end with the ".txt" extension. Most text editors (such as Wordpad)
automatically add this extension. Also,
all files must be in the same directory (folder) as the webpage
holding the applet.
Let's start with how to build the first choice menu,
the one that holds the teacher names. The applet looks for a file named "teacher.txt" Place
each teacher's name on a separate line. There should not be a return after
the last line, that just creates a blank line.
The applet looks for a file with the same name as the teacher. In the
example above, "Hurst" is the first line of the "teacher.txt" file.
The applet looks for a file named "Hurst.txt" to get a list of student
authors. It's built just like the teacher list, with each student on a separate
line. You can look at the included files to see what they look
like.
The applet determines the name of the actual student stories by building
a name based on the teacher and student choice buttons. For instance. If "Hurst" is
the teacher and "Jared" is the student, the applet looks for a file
named "HurstJared.txt" You must name your story files based on concatenating
the two choice buttons. You can look at the files included to see how they
are named.
Next, you need some stories. There must be six blanks to fill in, no
more and no less. There must be 14 lines in the story file and they should
look like this:
description of first blank
description of blank 2
description of blank 3
description of blank 4
description of blank 5
description of blank 6
Title of Story
Beginning of story up to the first blank
story from first blank to blank 2
story from blank 2 to blank 3
story from blank 3 to blank 4
story from blank 4 to blank 5
story from blank 5 to blank 6
plus story from blank 6 to the end of the story.
Here's an example written by
Jared:
number
noun
verb
plural noun
noun
verb
How to Make a Peanut Butter and Jelly Sandwich
Get
peices of bread. Then spread peanut butter on the bread with a
. Then
on the jelly. Then put the
together. Afterwards, put that on a
and
it.
I could write an application that automates this process if there's enough demand. That's it, have fun! </p>