A spot with 4 images ( I used images of the numbers 0-3).
The number 0 is displayed when entering the room.
Say "on" and the alarm loops through the numbers 1-3.
Say "off" and the alarm stops and 0 is displayed.
Can also start and stop the animation by moving your mouse cursor in and out of the spot. Simply remove or comment out the rollover and rollout event handlers if not used.
I tested before posting.
-bone
==========================
ON ENTER { 0 me setspotstatelocal }
ON ROLLOVER { 1 me setspotstatelocal 15 me setalarm }
ON ROLLOUT { 0 me setspotstatelocal }
ON OUTCHAT {
{ 1 me setspotstatelocal 15 me setalarm } chatstr "on" == if
{ 0 me setspotstatelocal } chatstr "off" == if }
ON ALARM { me getspotstate gss=
{ { gss++ gss me setspotstatelocal } { 1 gss= gss me setspotstatelocal } gss 3 < ifelse 15 me setalarm } gss 0 > if }
========================
Last edited by bjensen; 01-17-2010 at 06:15 AM.
Reason: correction: change chastr to chatstr
|