home *** CD-ROM | disk | FTP | other *** search
/ Digitální fotografie a video / Digitalni-fotografie-a-video-covermount.bin / Aplikace / Servis / Rejstrik.dxr / 00083.ls < prev    next >
Encoding:
Text File  |  1998-05-19  |  1.4 KB  |  51 lines

  1. property lastLine, lastClick, Vyber
  2. global Posledni_klik
  3.  
  4. on beginSprite me
  5.   set Posledni_klik to 1
  6.   set Vyber to the memberNum of sprite the spriteNum of me
  7.   set the visible of sprite the spriteNum of me to 1
  8.   set the foreColor of line lastClick of member Vyber to 8
  9.   set the foreColor of line 1 of member Vyber to 16
  10.   set lastClick to 1
  11.   set lastLine to 1
  12. end
  13.  
  14. on mouseWithin me
  15.   set ML to the mouseLine
  16.   if ML <> lastClick then
  17.     set the cursor of sprite the spriteNum of me to [member "ruka_1", member "ruka_2"]
  18.     set the foreColor of line ML of member Vyber to 0
  19.   else
  20.     set the cursor of sprite the spriteNum of me to -1
  21.   end if
  22.   if lastLine <> ML then
  23.     if lastClick <> lastLine then
  24.       set the foreColor of line lastLine of member Vyber to 8
  25.     end if
  26.     set lastLine to ML
  27.   end if
  28. end
  29.  
  30. on mouseLeave
  31.   if lastLine <> lastClick then
  32.     set the foreColor of line lastLine of member Vyber to 8
  33.   end if
  34. end
  35.  
  36. on mouseDown me
  37.   set ML to the mouseLine
  38.   set Posledni_klik to ML
  39.   set the foreColor of line lastClick of member Vyber to 8
  40.   set the foreColor of line ML of member Vyber to 16
  41.   set Pozice to line ML of field the memberNum of sprite (the spriteNum of me + 1)
  42.   if (Pozice >= 0) and (Pozice <= 1) then
  43.     set the position of sprite(12) to Pozice
  44.   else
  45.     set the position of sprite(12) to 0
  46.   end if
  47.   sendSprite(12, #positionThumb)
  48.   sendSprite(12, #scrollText)
  49.   set lastClick to ML
  50. end
  51.