home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 October / Pcwk1097.iso / REKLAMY / ATA-INT / 3220 / 3220.EXE / 3220.DXR / 00002.ls < prev    next >
Encoding:
Text File  |  1997-02-13  |  2.0 KB  |  102 lines

  1. global gBtns1, gCasts1, gBtns2, gCasts2, gBtns3, gCasts3, gHilite, gCopierPics, gCopySpr, gCopierMsgs, gMsgSpr, gBtns4, gCasts4, gMode, gDelay, gTrigger, gHiliteDelay
  2.  
  3. on btnJob1
  4.   setHilite1(gBtns1, gCasts1)
  5. end
  6.  
  7. on btnJob2
  8.   setHilite1(gBtns2, gCasts2)
  9. end
  10.  
  11. on btnJob4
  12.   setHilite1(gBtns4, gCasts4)
  13.   if not gTrigger or rollOver(46) then
  14.     exit
  15.   end if
  16.   swapCast(46, 281)
  17.   updateStage()
  18.   wait(10)
  19.   swapCast(46, 282)
  20.   updateStage()
  21. end
  22.  
  23. on setHilite1 n1, n2
  24.   repeat with i = 1 to count(n1)
  25.     set s to getAt(n1, i)
  26.     set c1 to getAt(n2, i)
  27.     set c2 to c1 + 1
  28.     set c3 to c1 + 2
  29.     if rollOver(s) then
  30.       if the mouseDown then
  31.         swapCast(s, c3)
  32.       else
  33.         swapCast(s, c2)
  34.       end if
  35.       next repeat
  36.     end if
  37.     swapCast(s, c1)
  38.   end repeat
  39. end
  40.  
  41. on swapCast n1, n2
  42.   puppetSprite(n1, 1)
  43.   set the castNum of sprite n1 to n2
  44. end
  45.  
  46. on btnJob3
  47.   set n to count(gBtns3)
  48.   repeat with i = 1 to n
  49.     set s to getAt(gBtns3, i)
  50.     set c1 to getAt(gCasts3, i)
  51.     set c2 to c1 + 1
  52.     set c3 to c1 + 2
  53.     set p to getAt(gCopierPics, i)
  54.     set m to getAt(gCopierMsgs, i)
  55.     if rollOver(s) then
  56.       if i < 10 then
  57.         swapCast(gMsgSpr, m)
  58.         swapCast(gCopySpr, p)
  59.         set gHiliteDelay to the timer
  60.         set gHilite to 1
  61.       end if
  62.       if the mouseDown then
  63.         swapCast(s, c3)
  64.       else
  65.         swapCast(s, c2)
  66.       end if
  67.       next repeat
  68.     end if
  69.     if ((the timer - gHiliteDelay) < 60) or not (i = gHilite) then
  70.       swapCast(s, c1)
  71.       next repeat
  72.     end if
  73.     swapCast(s, c2)
  74.     swapCast(gMsgSpr, m)
  75.     swapCast(gCopySpr, p)
  76.     updateStage()
  77.     wait(180)
  78.   end repeat
  79.   set gHilite to gHilite + 1
  80.   if gHilite > 9 then
  81.     set gHilite to 1
  82.   end if
  83. end
  84.  
  85. on wait n1
  86.   set t to the timer
  87.   repeat while (the timer - t) < n1
  88.   end repeat
  89. end
  90.  
  91. on delayJob n1
  92.   if not gDelay then
  93.     set gDelay to the timer
  94.   else
  95.     if (the timer - gDelay) > n1 then
  96.       set gDelay to 0
  97.       exit
  98.     end if
  99.   end if
  100.   go(the frame)
  101. end
  102.