






This tutorial describes the development of a program called Tiles. The Tiles program displays three kinds of tiles, representing rock, paper, and scissors. Each tile also has a color associated with it: red, green, or blue.
The initial goal is simple: display three tiles, one of each kind, with their associated colors. To avoid having to concentrate on the drawing aspect of the program, each tile is represented by a simple geometric shape:
- The rock is represented by an ellipse
- The paper is represented by a rectangle
- The scissors are represented by a triangle

Each step of this tutorial will show you how to add functionality to the Tiles program, as follows:
- Building a document component that displays the three tiles
- Allowing the user to select a specific tile using the mouse
- Causing a tile to change color--for example, from red to green to blue back to red--whenever the user clicks on it
- Allowing the user to select a single tile
- Adding the Tiles menu with color choices (the color is applied to the currently selected tile) and with items for adding new tiles to the document component
- Allowing the user to move tiles using the mouse
- Allowing the user to cut, copy, and paste selected tiles between Tiles documents or into another Presentation framework document that can embed models
- Allowing the user to drag a color from the ColorChooser tool onto any tile
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.
Generated with WebMaker