home *** CD-ROM | disk | FTP | other *** search
/ Mac Ga Ichiban! 1997 May / macgaichiban199705.bin / MOVIES / EXPO.Dxr / 00032.ls < prev    next >
Encoding:
Text File  |  1997-03-12  |  2.6 KB  |  102 lines

  1. on judgeflash
  2.   if rollOver(5) then
  3.     flashbutton(5)
  4.   else
  5.     if rollOver(6) then
  6.       flashbutton(6)
  7.     else
  8.       if rollOver(7) then
  9.         flashbutton(7)
  10.       else
  11.         if rollOver(8) then
  12.           flashbutton(8)
  13.         else
  14.           if rollOver(9) then
  15.             flashbutton(9)
  16.           else
  17.             if rollOver(10) then
  18.               flashbutton(10)
  19.             else
  20.               judgepuppet(5, 10)
  21.             end if
  22.           end if
  23.         end if
  24.       end if
  25.     end if
  26.   end if
  27. end
  28.  
  29. on flashbutton spnum
  30.   global gflashbuttonnum
  31.   if (gflashbuttonnum <> spnum) and (gflashbuttonnum <> 0) then
  32.     set ccname to item 1 of the name of cast the castNum of sprite gflashbuttonnum
  33.     set the castNum of sprite gflashbuttonnum to the number of member (ccname & ",off")
  34.     updateStage()
  35.     puppetSprite(gflashbuttonnum, 0)
  36.     updateStage()
  37.   end if
  38.   puppetSprite(spnum, 1)
  39.   set cname to item 1 of the name of cast the castNum of sprite spnum
  40.   set the castNum of sprite spnum to the number of member (cname & ",on")
  41.   updateStage()
  42.   set gflashbuttonnum to spnum
  43. end
  44.  
  45. on judgepuppet startspnum, endspnum
  46.   repeat with i = startspnum to endspnum
  47.     if the puppet of sprite i = 1 then
  48.       set ccname to item 1 of the name of cast the castNum of sprite i
  49.       set the castNum of sprite i to the number of member (ccname & ",off")
  50.       updateStage()
  51.       puppetSprite(i, 0)
  52.       updateStage()
  53.     end if
  54.   end repeat
  55. end
  56.  
  57. on button soundname
  58.   puppetSound(soundname)
  59.   updateStage()
  60.   set cname to item 1 of the name of cast the castNum of sprite clickOn()
  61.   set the castNum of sprite clickOn() to the number of member (cname & ",on")
  62.   updateStage()
  63.   repeat with i = 1 to 10
  64.   end repeat
  65.   repeat while stillDown()
  66.     if rollOver(clickOn()) then
  67.       set the castNum of sprite clickOn() to the number of member (cname & ",on")
  68.       updateStage()
  69.       next repeat
  70.     end if
  71.     set the castNum of sprite clickOn() to the number of member (cname & ",off")
  72.     updateStage()
  73.   end repeat
  74.   set the castNum of sprite clickOn() to the number of member (cname & ",off")
  75.   updateStage()
  76. end
  77.  
  78. on changecursor s, e
  79.   repeat with i = s to e
  80.     set the cursor of sprite i to [the number of member "cursor", the number of member "cursormask"]
  81.   end repeat
  82. end
  83.  
  84. on unchangecursor s, e
  85.   repeat with i = s to e
  86.     set the cursor of sprite i to -1
  87.   end repeat
  88. end
  89.  
  90. on wait sec
  91.   global gwaittime, gflagwait
  92.   if gflagwait = 0 then
  93.     set gwaittime to the timer
  94.     set gflagwait to 1
  95.   end if
  96.   if the timer < (gwaittime + (60 * sec)) then
  97.     go(the frame)
  98.   else
  99.     set gflagwait to 0
  100.   end if
  101. end
  102.