Play Tic-Tac-Toe on an interactive Acrobat PDF Form
More than X's and O's under the hood -- look for yourself!

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.

Interactive PDF Tic-Tac-Toe game 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


PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Ubiquitous PDF: Printable PDF 2010 calendars

With the new year just around the next bend, you might be looking to update your calendars. Thanks to Vertex42.com, users can now download and print a free PDF calendar for 2010. The page lets visitors select from a variety of styles and offers both yearly and monthly calendars.

December 10, 2009
Search Planet PDF
more searching options...







Download PDF Creator

PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools enfocus

QuickPDF: The Unrivaled PDF Developer Toolkit

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

No upcoming events

PDF Store Categories