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

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