home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 September / PCD0995.ISO / files / intro.dir / 00083.ls < prev    next >
Encoding:
Text File  |  1995-01-24  |  1.4 KB  |  49 lines

  1. on mouseDown
  2.   set WhichSprite to the clickOn
  3.   puppetSprite(WhichSprite, 1)
  4.   set the castNum of sprite WhichSprite to the number of cast "OK lit"
  5.   repeat while the stillDown
  6.     updateStage()
  7.   end repeat
  8. end
  9.  
  10. on mouseUp
  11.   global gPTimerSet, gPresentationTime, gPresentingTo, gLightColor
  12.   set the castNum of sprite 12 to the number of cast "OK"
  13.   updateStage()
  14.   if the text of field "Timer Amount" = EMPTY then
  15.     alert("You need to enter a number into the Timer field!")
  16.     exit
  17.   end if
  18.   set whatTime to value(the text of field "Timer Amount")
  19.   if integerp(whatTime) then
  20.     startTimer()
  21.     set gPTimerSet to 1
  22.     set gPresentationTime to whatTime
  23.     set the timeoutLength to 3600 * whatTime
  24.     set gPresentingTo to the text of field "Who To"
  25.     put gPresentingTo into field "CompanyDisplay"
  26.     set gLightColor to "Green timer light lit"
  27.     puppetSprite(12, 0)
  28.     updateStage()
  29.     go("start")
  30.     exit
  31.   end if
  32.   if floatp(whatTime) then
  33.     startTimer()
  34.     set gPTimerSet to 1
  35.     set gPresentationTime to whatTime
  36.     set the timeoutLength to 3600 * whatTime
  37.     set gPresentingTo to the text of field "Who To"
  38.     put gPresentingTo into field "CompanyDisplay"
  39.     set gLightColor to "Green timer light lit"
  40.     puppetSprite(12, 0)
  41.     updateStage()
  42.     go("start")
  43.     exit
  44.   end if
  45.   alert("You need to enter a number greater than 2!")
  46.   puppetSprite(12, 0)
  47.   updateStage()
  48. end
  49.