[Etoys] A "Clock" project in Etoys

Yoshiki Ohshima yoshiki at vpri.org
Fri Nov 16 00:15:31 EST 2007


  After having a conversation with one of my colleague (Ian), I
couldn't resist, and I happened to have some spare time while helping
a TA as an unofficial TA.  So I made a Clock project in Etoys.

  The file is available at:


  One way or another, please load it onto Etoys (on a non-XO
environment, drag-and-drop from Finder or Explorer.  On XO, access the
URL with browse, copy it to a USB memory and resume it from Journal,
or hit Alt-, for "Show Source" -> 'open...' -> 'file list...' and
navigate to the .pr file).

  After it starts, don't forget to move the mouse around!

  The fun thing about it is that only non-trivial thing the user needs
is a text version of Clock that is available in the Object Catalog.
Everything else is built with simple Text, Ellipse, Rectangle, and
Star.  (The digital clock uses another pre-made widget.)

  The essense of rotating the analog clock hands is three equations
each of which decides the angle of a hand.  The script shown in the
project has such three lines.  In the other words, kids don't have to
know any more magic than setting the heading of objects.  (The script
has other two lines, but these are used to provide some effect for the
digital clock.)  You can change the equations dynamically to make, for
example, the clock goes backward. The variables are accessible to the
user, so learning about the clock, such as angles and rate, etc. can
be done from this project.

-- Yoshiki

  There is a bug.  If the digits in the analog clock is truncated,
press "resetResult" button.

More information about the Etoys mailing list