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

  1. on judgeflash
  2.   set jnum to rollOver()
  3.   case jnum of
  4.     5, 6, 7, 8, 9:
  5.       flashbutton(jnum)
  6.     otherwise:
  7.       judgepuppet(5, 9)
  8.       judgepuppetext(20)
  9.   end case
  10. end
  11.  
  12. on flashbutton spnum
  13.   global gflashbuttonnum
  14.   if (gflashbuttonnum <> spnum) and (gflashbuttonnum <> 0) then
  15.     set ccname to item 1 of the name of cast the castNum of sprite gflashbuttonnum
  16.     set the castNum of sprite gflashbuttonnum to the number of member (ccname & ",off")
  17.     updateStage()
  18.     puppetSprite(gflashbuttonnum, 0)
  19.     updateStage()
  20.     puppetSprite(20, 0)
  21.   end if
  22.   puppetSprite(spnum, 1)
  23.   set cname to item 1 of the name of cast the castNum of sprite spnum
  24.   set the castNum of sprite spnum to the number of member (cname & ",on")
  25.   puppetSprite(20, 1)
  26.   set the type of sprite 20 to 1
  27.   set the ink of sprite 20 to 36
  28.   set the castNum of sprite 20 to the number of member cname
  29.   set the loc of sprite 20 to point(80, 60)
  30.   updateStage()
  31.   set gflashbuttonnum to spnum
  32. end
  33.  
  34. on judgepuppet startspnum, endspnum
  35.   repeat with i = startspnum to endspnum
  36.     if the puppet of sprite i = 1 then
  37.       set ccname to item 1 of the name of cast the castNum of sprite i
  38.       set the castNum of sprite i to the number of member (ccname & ",off")
  39.       updateStage()
  40.       puppetSprite(i, 0)
  41.       updateStage()
  42.     end if
  43.   end repeat
  44. end
  45.  
  46. on judgepuppetext startspnum
  47.   if the puppet of sprite startspnum = 1 then
  48.     puppetSprite(startspnum, 0)
  49.     updateStage()
  50.   end if
  51. end
  52.  
  53. on judgeflash2
  54.   set jnum to rollOver()
  55.   case jnum of
  56.     14, 15:
  57.       flashbutton2(jnum)
  58.     otherwise:
  59.       judgepuppet(14, 15)
  60.   end case
  61. end
  62.  
  63. on flashbutton2 spnum
  64.   global gflashbuttonnum
  65.   if (gflashbuttonnum <> spnum) and (gflashbuttonnum <> 0) then
  66.     set ccname to item 1 of the name of cast the castNum of sprite gflashbuttonnum
  67.     set the castNum of sprite gflashbuttonnum to the number of member (ccname & ",off")
  68.     updateStage()
  69.     puppetSprite(gflashbuttonnum, 0)
  70.     updateStage()
  71.   end if
  72.   puppetSprite(spnum, 1)
  73.   set cname to item 1 of the name of cast the castNum of sprite spnum
  74.   set the castNum of sprite spnum to the number of member (cname & ",on")
  75.   updateStage()
  76.   set gflashbuttonnum to spnum
  77. end
  78.  
  79. on button soundname
  80.   puppetSound(soundname)
  81.   updateStage()
  82.   set cname to item 1 of the name of cast the castNum of sprite clickOn()
  83.   set the castNum of sprite clickOn() to the number of member (cname & ",on")
  84.   updateStage()
  85.   set t to the timer
  86.   repeat while the timer < (t + 5)
  87.   end repeat
  88.   repeat while stillDown()
  89.     if rollOver(clickOn()) then
  90.       set the castNum of sprite clickOn() to the number of member (cname & ",on")
  91.       updateStage()
  92.       next repeat
  93.     end if
  94.     set the castNum of sprite clickOn() to the number of member (cname & ",off")
  95.     updateStage()
  96.   end repeat
  97.   set the castNum of sprite clickOn() to the number of member (cname & ",off")
  98.   updateStage()
  99. end
  100.  
  101. on getname itemdelimiternum
  102.   global ggetcname
  103.   set ggetcname to item itemdelimiternum of the name of cast the castNum of sprite clickOn()
  104. end
  105.  
  106. on changecursor s, e
  107.   repeat with i = s to e
  108.     set the cursor of sprite i to [the number of member "cursor", the number of member "cursormask"]
  109.   end repeat
  110. end
  111.  
  112. on unchangecursor s, e
  113.   repeat with i = s to e
  114.     set the cursor of sprite i to -1
  115.   end repeat
  116. end
  117.  
  118. on visble s, e
  119.   repeat with i = s to e
  120.     set the visible of sprite i to 1
  121.   end repeat
  122. end
  123.  
  124. on unvisible s, e
  125.   repeat with i = s to e
  126.     set the visible of sprite i to 0
  127.   end repeat
  128. end
  129.  
  130. on puppet s, e
  131.   repeat with i = s to e
  132.     puppetSprite(i, 1)
  133.   end repeat
  134. end
  135.  
  136. on unpuppet s, e
  137.   repeat with i = s to e
  138.     puppetSprite(i, 0)
  139.   end repeat
  140. end
  141.  
  142. on returnframe name
  143.   go(name)
  144. end
  145.  
  146. on returnmovie mname
  147.   go(1, mname)
  148. end
  149.  
  150. on wait sec
  151.   global gwaittime, gflagwait
  152.   if gflagwait = 0 then
  153.     set gwaittime to the timer
  154.     set gflagwait to 1
  155.   end if
  156.   if the timer < (gwaittime + (60 * sec)) then
  157.     go(the frame)
  158.   else
  159.     set gflagwait to 0
  160.   end if
  161. end
  162.  
  163. on changecast spnum, castname
  164.   set the castNum of sprite spnum to the number of member castname
  165. end
  166.  
  167. on soudvolumecontrol spnum
  168.   global gsoundnum, gsoundlist
  169.   set gsoundnum to gsoundnum + 1
  170.   if gsoundnum = 9 then
  171.     set gsoundnum to 0
  172.   end if
  173.   set the castNum of sprite spnum to the number of member ("sound," & gsoundnum)
  174.   set the soundLevel to getAt(gsoundlist, gsoundnum + 1)
  175.   updateStage()
  176. end
  177.  
  178. on pbutton
  179.   set cname to item 1 of the name of member the memberNum of sprite clickOn()
  180.   set the memberNum of sprite clickOn() to the number of member (cname & ",on")
  181. end
  182.  
  183. on helpmenu spnum, jhelp
  184.   global ghelplist
  185.   if jhelp = 0 then
  186.     set helpspnum to rollOver()
  187.     if getPos(ghelplist, helpspnum) <> 0 then
  188.       set cname to item 1 of the name of cast the castNum of sprite helpspnum
  189.       set the visible of sprite spnum to 1
  190.       set the castNum of sprite spnum to the number of member (cname & ",help")
  191.       set the loc of sprite spnum to point(320, 240)
  192.       if helpspnum = 15 then
  193.         set the castNum of sprite 15 to the number of member "quit,HELP,off"
  194.       end if
  195.       updateStage()
  196.     else
  197.       set the visible of sprite spnum to 0
  198.       set the castNum of sprite 15 to the number of member "quit,off"
  199.       updateStage()
  200.     end if
  201.   end if
  202. end
  203.  
  204. on quitbutton
  205.   puppetSound("click")
  206.   updateStage()
  207.   if item 3 of the name of cast the castNum of sprite clickOn() = EMPTY then
  208.     set cname to item 1 of the name of cast the castNum of sprite clickOn()
  209.     set the castNum of sprite clickOn() to the number of member (cname & ",on")
  210.     updateStage()
  211.     repeat while stillDown()
  212.       if rollOver(clickOn()) then
  213.         set the castNum of sprite clickOn() to the number of member (cname & ",on")
  214.       else
  215.         set the castNum of sprite clickOn() to the number of member (cname & ",off")
  216.       end if
  217.       updateStage()
  218.     end repeat
  219.     set the castNum of sprite clickOn() to the number of member (cname & ",off")
  220.     updateStage()
  221.   else
  222.     set cname to item 1 of the name of cast the castNum of sprite clickOn()
  223.     set ccname to item 2 of the name of cast the castNum of sprite clickOn()
  224.     set the castNum of sprite clickOn() to the number of member (cname & "," & ccname & ",on")
  225.     updateStage()
  226.     repeat while stillDown()
  227.       if rollOver(clickOn()) then
  228.         set the castNum of sprite clickOn() to the number of member (cname & "," & ccname & ",on")
  229.       else
  230.         set the castNum of sprite clickOn() to the number of member (cname & "," & ccname & ",off")
  231.       end if
  232.       updateStage()
  233.     end repeat
  234.     set the castNum of sprite clickOn() to the number of member (cname & "," & ccname & ",off")
  235.     updateStage()
  236.   end if
  237. end
  238.