Zat Home Zat Home Zat - Tools for the Future of the Internet
Spin World Download
About Zat
Site Map

Spin Examples

These Spin example programs are included in the regular Spin installation. As we or others build new example programs, we will add them to this page.

If you have a Spin project that you would like to have included on this page, please send it to

Each example consists of one file in the examples subdirectory of the Spin installation directory, and optionally several files in the asset subdirectory. All of the examples are capsules that can be opened directly from within Spin.

BlueBoxClick (1K)

Displays a blue box that when clicked turns a different shade of blue. Demonstrates use of a simple behavior. Note that when used in the toybox, closing and reopening the toybox will start again. The toybox only stores edited changes, not changes based on behavior execution.

Beans: zat.display.Rect.

Assets: none.

Bounce (3K)

Displays two objects, a box and a ball, contained within an opaque scene. Each have the same complex behavior -- bounce -- that drops the object and makes it bounce when clicked with the mouse.

Beans: zat.display.Rect, zat.display.ImageURL.

Assets: asset/ball.gif.

Clock (9K)

A combination analog, digital, and cuckoo clock, all in one! For demonstration purposes, you can click on the clock to make it cuckoo. To make it act like a normal cuckoo clock, change the cuckoo behavior (under the chime actor) to activate on Time.hour.timeChanged rather than background.Mouse.mouseClicked. Note that an analog clock is an example of something that would be difficult to build in an authoring tool like Director.

Beans: zat.misc.Time, zat.misc.AudioURL, zat.display.Rect, zat.display.Drawable, zat.display.Text

Assets: asset/snd/

Cloning (2K)

Demonstrates the ability to clone capsules. This example contains a Capsule that has as its contents a ball that bounces when the capsule is cloned. Clicking the button clones the capsule. Note that the toybox view does not support capsule cloning. You should run this project to see it work.

Beans: zat.display.Oval.

Assets: none.

CubeWReverse (39K)

Displays an rotating cube with a button that reverses its direction. Demonstrates IfTest behavior, and the ability to activate several behaviors in top-down order via a single event.

Beans: zat.display.AnimatedGIFURL.

Assets: asset/anim/zatcube.gif.

Drag (2K)

Displays a single rectangle which can be dragged around with the mouse. The drag behavior is a complex behavior created within the tool. Also available as a prebuilt user behavior.

Beans: zat.display.Rect.

Assets: none.

Happy (112K)

An animating behavior example. Displays two animated characters over a background. The happy guy can be dragged around, and jumps when clicked. Try attaching jump behaviors to other objects (including the background).

Beans: zat.display.AnimatedGIFURL, zat.display.ImageURL.

Assets: asset/background.gif, asset/anim/happyrun.gif, asset/anim/bunny.gif.

The delightful animated characters in this example are copyright Marina Zurkow of O-Matic — many thanks to her for letting us use them.

Scribble (2K)

A simple drawing application. Allows you to draw multiple lines to make an image. Also allows the color of the image to be changed.

Beans: zat.display.Drawable, zat.display.Rect.

Assets: none.

SlideShow (13K)

Displays a simple slideshow with two slides, and a next and previous button to navigate between them. Illustrates the use of sharing visuals between scenes, and the use of animated gifs create buttons.

Beans: zat.display.Rect, zat.display.AnimatedGIFURL, zat.display.ImageURL, zat.display.Text, zat.display.Oval

Assets: asset/stripe.gif, zat.gif, zatinc.gif, asset/anim/next.gif, previous.gif.

SlideShowTransition (13K)

Same as above, but with a simple rolling transition between scenes.

Beans: zat.display.Rect, zat.display.AnimatedGIFURL, zat.display.ImageURL, zat.display.Text, zat.display.Oval

Assets: asset/stripe.gif, zat.gif, zatinc.gif, asset/anim/next.gif, previous.gif.

StockGraph (2K)

Displays current stock graph images fetched from the yahoo site. Enter a ticker symbol, and hit Display, or simply choose a symbol from the list.

Beans: zat.display.ImageURL.

Assets: none.

StockGraphLocal (21K)

Displays stock graph images fetched from a limited set on disk. Essentially this is the same as StockGraph above, except it does not require an Internet connection. Symbols are limited to those for which there are assets (see list below), and of course the stock data is not current.

Beans: zat.display.ImageURL.

Assets: chart/a/aapl.gif, adbe.gif, adsk.gif,
chart/c/cisc.gif, cpq.gif,
chart/m/macr.gif, msft.gif
chart/t/tek.gif, txn.gif

3D Zat Logo