home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 May / CHIPCD5_98.iso / software / testsoft / carr / IRL.CST / 00017_Script_s_teksthandler < prev    next >
Text File  |  1998-01-28  |  1KB  |  32 lines

  1. on exitFrame
  2.   global g_scrltimer,g_bscrstate,g_textmem,g_listLen,g_ListSize,g_slspr,g_slVl
  3.   global g_sliderSize,g_sliderTop
  4.   
  5.   -- obsluga samopowtarzania scrolla
  6.   if (the timer-g_scrltimer)>30 then
  7.     if g_bscrstate=#Up then
  8.       set tmp=the scrollTop of g_textmem
  9.       if tmp>15 then set the scrollTop of g_textmem to tmp-15
  10.       else set the scrollTop of g_textmem to 0
  11.     end if
  12.     if g_bscrstate=#Down then
  13.       set tmp=the scrollTop of g_textmem
  14.       if (tmp+g_ListSize)<(g_ListLen+15) then
  15.         set the scrollTop of g_textmem to tmp+15
  16.       end if  
  17.     end if
  18.   end if
  19.   
  20.   -- obsluga suwaka
  21.   if the locV of sprite g_slspr<>g_slVl then
  22.     set tmp=((the locV of sprite g_slspr)-g_sliderTop)
  23.     set tmp2=tmp*(g_ListLen-g_ListSize)/g_sliderSize 
  24.     set the scrollTop of g_textmem to tmp2
  25.     set g_slVl=the locV of sprite g_slspr
  26.   end if
  27. end
  28.  
  29. on mouseUp
  30.   global g_slspr,g_slramkaspr
  31.   if rollOver(g_slramkaspr) then set the locV of sprite g_slspr to the mouseV
  32. end