home *** CD-ROM | disk | FTP | other *** search
/ GameStar 1998 November (Bonus) / GAMESTAR11B.ISO / ENCYC99 / MM / T012919A.DCR / 00046_ButtonTrackerMaker.ls < prev    next >
Encoding:
Text File  |  1998-06-09  |  745 b   |  39 lines

  1. property buttonList, channelList, activeButton
  2.  
  3. on new me
  4.   set buttonList to [:]
  5.   set channelList to []
  6.   return me
  7. end
  8.  
  9. on makeButton me, wType, wState, wChannel
  10.   set tButton to new(script "ButtonMaker", wType, wState, wChannel, me)
  11.   addProp(buttonList, wChannel, tButton)
  12.   add(channelList, wChannel)
  13.   return tButton
  14. end
  15.  
  16. on deactivate me, aButton
  17.   set activeButton to 0
  18. end
  19.  
  20. on mouseCheck
  21.   if activeButton = 0 then
  22.     if the stillDown = 0 then
  23.       repeat with i in channelList
  24.         if rollOver(i) then
  25.           set activeButton to getProp(buttonList, i)
  26.         end if
  27.       end repeat
  28.     end if
  29.   else
  30.     buttonActive(activeButton)
  31.   end if
  32. end
  33.  
  34. on resetButtons me
  35.   repeat with i in buttonList
  36.     reset(i)
  37.   end repeat
  38. end
  39.