--========= -- put this in movie level script The startmovie script sets a variable called eflag which is used in the timer event. The idle script runs all the time and reads a function called the long time. It puts the relevant sections into variables called curhr,curmin, etc. It has to adjust where to find them if the the hour is greater than 9 (length of the string changes). ----------------------------- on startMovie -- need to set the timer flag to start global eflag put 0 into eflag end on idle global curhr,curmin,cursec,oldsec, curday getcurtime end on getcurtime global curhr,curmin,cursec,oldsec z = the long time set the itemdelimiter = ":" z1= item 1 of z z2 = item 2 of z z3 = word 1 of item 3 of z z4 = word 2 of item 3 of z if z4 = "PM" then z1 = integer( z1+12) end if curhr = z1 curmin = z2 cursec = z3 set the text of field "time" = z end This routine responds to start timer button by setting variable called eflag and changing the text on the button. It is in the movie script and is called by the start the timeer button ------------------------------- on tevent global eflag if the text of cast 14 = "start the timer" then set the text of cast 14 to "stop the timer" startTimer set eflag = 1 else set the text of cast 14 to "start the timer" set eflag = 0 end if --========= -- put this in frame level script - one frame movie These are in the frame script. ReportTimer is a routine that I invented that uses Director's built in functions to tell when the last click, mouse roll and key press were. It converts ticks to fractions of a second and puts them in cast member 5. The routine called balltime moves the balls. It uses the variables curhr, curmin, etc. It figures out where to put the ball by seeing what proportion of the line's length of 300 the time represents. For example 15 minutes represents 15/60ths of the line. ------------------ on exitFrame global eflag go to the frame balltime if eflag = 1 then reportTimer end on balltime global curhr,curmin,cursec -- every sprite must be puppeted puppetsprite 2,true puppetsprite 3,true puppetsprite 4,true puppetsprite 5,true puppetsprite 12,true set the locH of sprite 2 to (300/24)*curhr + 5 set the locH of sprite 3 to (300/60)*curmin + 5 set the locH of sprite 5 to (300/60)*curmin + 5 set the text of cast 12 to curmin set the locH of sprite 4 to (300/60)*cursec + 5 set the locH of sprite 12 to (300/60)*cursec + 5 set the text of cast 13 to cursec sprite(19).rotation = cursec*6 end balltime on reportTimer set totaltext = "x" set cl = "last clicktime= " &the lastClick && (the lastClick/60.0)&"sec" set ke = "last keytime= " & the lastkey && (the lastKey/60.0)&"sec" set ro = "the lastRolltime " & the lastRoll && (the lastRoll/60.0)&"sec" set ti = "Time elapsed= " & the Timer && (the Timer/60.0)&"sec" put cl into line 1 of totaltext put ke into line 2 of totaltext put ro into line 3 of totaltext put ti into line 4 of totaltext set the text of cast 5 = totaltext end