home *** CD-ROM | disk | FTP | other *** search
/ Dé Millennium / MCD.ISO / mmm / test.dxr / 00127_scroll_arrow.ls < prev    next >
Encoding:
Text File  |  1999-04-22  |  1007 b   |  50 lines

  1. property scr_dragging, scr_direction, scr_units
  2.  
  3. on beginSprite me
  4.   set scr_dragging to 0
  5. end
  6.  
  7. on scr_Hide me
  8.   set the visible of sprite the currentSpriteNum to 0
  9. end
  10.  
  11. on scr_Show me
  12.   set the visible of sprite the currentSpriteNum to 1
  13. end
  14.  
  15. on getPropertyDescriptionList me
  16.   set pdlist to [:]
  17.   addProp(pdlist, #scr_direction, [#comment: "Direction", #format: #symbol, #range: [#Up, #down], #default: #Up])
  18.   addProp(pdlist, #scr_units, [#comment: "Pixels/cycle", #format: #integer, #default: 10])
  19.   return pdlist
  20. end
  21.  
  22. on mouseDown me
  23.   set scr_dragging to 1
  24.   pass()
  25. end
  26.  
  27. on mouseUp me
  28.   set scr_dragging to 0
  29.   pass()
  30. end
  31.  
  32. on mouseUpOutSide me
  33.   set scr_dragging to 0
  34.   pass()
  35. end
  36.  
  37. on exitFrame me
  38.   if scr_dragging then
  39.     if rollOver(the currentSpriteNum) then
  40.       if scr_direction = #Up then
  41.         sendAllSprites(#scr_scrollup, scr_units)
  42.       else
  43.         if scr_direction = #down then
  44.           sendAllSprites(#scr_scrolldown, scr_units)
  45.         end if
  46.       end if
  47.     end if
  48.   end if
  49. end
  50.