home *** CD-ROM | disk | FTP | other *** search
/ Games Central GT Digital… Q3 Premier Trimestre '98 / GT_DPK.ISO / pc / data / menu.dxr / 00045_Scroll Arrow Button behavior.ls < prev    next >
Encoding:
Text File  |  1995-08-25  |  661 b   |  34 lines

  1. property pScrollDelay, pButtonClicked, pDirection
  2.  
  3. on beginSprite me
  4.   set pScrollDelay to 10
  5.   set currentMember to the member of sprite the spriteNum of me
  6.   if the name of member currentMember contains "up" then
  7.     set pDirection to #up
  8.   else
  9.     set pDirection to #down
  10.   end if
  11. end
  12.  
  13. on mouseDown me
  14.   set pButtonClicked to 1
  15.   sendAllSprites(#scrollText, pDirection)
  16.   startTimer()
  17. end
  18.  
  19. on mouseLeave me
  20.   set pButtonClicked to 0
  21. end
  22.  
  23. on mouseUp me
  24.   set pButtonClicked to 0
  25. end
  26.  
  27. on mouseWithin me
  28.   if pButtonClicked = 1 then
  29.     if the mouseDown and (the timer > pScrollDelay) then
  30.       sendAllSprites(#scrollText, pDirection)
  31.     end if
  32.   end if
  33. end
  34.