Dr. D. P. Story devotes considerable time and skill in creating the many classroom-oriented tutorials in PDF featured on his AcroTex (http://www.math.uakron.edu/~dpstory/acrotex.html) site. He also manages to fit in a little fun and games, such as recently creating a Tic-Tac-Toe game in the form of an interactive PDF Form using JavaScript.

View full-size image.
"This is a game created to amuse my son, Alexander," he says (Yeah, right!) in explaining the motivation behind it. He shared with Planet PDF a glimpse of the technology and techniques behind the curtain, so to speak.
"The board layout was done using the typesetting system called TeX, the form elements were created using the pdfmark operator," Dr. Story says.
"The blank board is a series of nine contiguous square links to respond to a
user's click. Superimposed on each of these links is a check box of identical
dimensions. These check boxes have cumtomized "X" and "O" appearances
(/AP << /N << /On {xO} /Off {xX} >> >>)."
"All other actions are controlled by document-level JavaScript, which was written using Acrobat's GUI."
If that's as much detail -- or more -- than you care to know (or can grasp), download the Tic-Tac-Toe PDF [PDF: 40kb] and play a few games.
If you want to get deeper under the hood to see what makes the game tick, activate the Forms tool in Acrobat 5.0 and snoop around inside -- examine the form's various Field Properties, JavaScript code (using the built-in JavaScript Editor) and other out-of-site tech goodies.
There's even more detail on the game's construction (a simpler variation) referenced in another PDF-based article -- "Pdfmarks: Links and Forms," [PDF: 425kb] -- available on Dr. Story's AcroTex site. The article covers "the basic, the advanced and the more subtle techniques of creating hypertext links and form annotations."
The relevant game reference begins on page 35 with:
"The Tic-Tac-Toe Board has overlapping link and checkbox regions.
Initially, the board is empty, the links are active and the checkboxes
are hidden. Click on one of the nine regions to prompt a link annotation
to perform the action of showing the hidden checkbox."
If you still want to know more, you know the math wizard to ask!
MORE INFO