home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1995 November / SHOWCASE.ISO / files / intro.dir / 00083_Script_83 < prev    next >
Text File  |  1995-06-14  |  2KB  |  57 lines

  1. on mouseDown
  2.   set whichSprite = the clickon
  3.   puppetSprite whichSprite, 1
  4.   set the castnum of sprite whichsprite = 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.   
  13.   set the castnum of sprite 12 = the number of cast "OK"
  14.   updateStage
  15.   -- Check to see whether anything has been entered into the Timer field.
  16.   if the text of field "Timer Amount" = "" then
  17.     alert "You need to enter a number into the Timer field!"
  18.     exit
  19.   end if
  20.   
  21.   -- If something has, see what it is.
  22.   set whatTime = value(the text of field "Timer Amount")
  23.   
  24.   -- Integers and floats are O.K.
  25.   if integerP(whatTime) then 
  26.     startTimer
  27.     set gPTimerSet = 1
  28.     set gPresentationTime = whatTime
  29.     set the timeoutLength =  3600 * whatTime
  30.     set gPresentingTo = the text of field "Who To"
  31.     put gPresentingTo into field "CompanyDisplay"
  32.     set gLightColor = "Green timer light lit"
  33.     puppetSprite 12, 0
  34.     updateStage
  35.     go "start"
  36.     exit
  37.   end if
  38.   
  39.   if floatP(whatTime) then
  40.     startTimer
  41.     set gPTimerSet = 1
  42.     set gPresentationTime = whatTime
  43.     set the timeoutLength =  3600 * whatTime
  44.     set gPresentingTo = the text of field "Who To"
  45.     put gPresentingTo into field "CompanyDisplay"
  46.     set gLightColor = "Green timer light lit"
  47.     puppetSprite 12, 0  
  48.     updateStage
  49.     go "start"
  50.     exit
  51.   end if
  52.   
  53.   -- If it's not an integer or a float it must be text. Text won't cut it!
  54.   alert "You need to enter a number greater than 2!"
  55.   puppetSprite 12, 0  
  56.   updateStage
  57. end