home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1998 January / macformat-059.iso / mac / Demos / Martial Arts Demo / media / exit.Dxr / Internal_8.ls < prev    next >
Encoding:
Text File  |  1997-09-30  |  3.6 KB  |  157 lines

  1. on startMovie
  2.   global happened
  3.   set happened to EMPTY
  4. end
  5.  
  6. on mainButton
  7.   global mouseUpped, leftNavBtn, whichJump
  8.   if not (the mouseDown) then
  9.     set mouseUpped to 1
  10.   end if
  11.   if rollOver(26) then
  12.     if the mouseDown then
  13.       if mouseUpped = 1 then
  14.         puppetSprite(26, 1)
  15.         puppetSound(1, member 3 of castLib "internal sounds")
  16.         cursorSign()
  17.         set the member of sprite 26 to member (the memberNum of sprite 26 + 1) of castLib "graphics"
  18.         updateStage()
  19.         sixthSecDel()
  20.         set the member of sprite 26 to member (the memberNum of sprite 26 - 1) of castLib "graphics"
  21.         updateStage()
  22.         set mouseUpped to 0
  23.         repeat with a = 1 to 48
  24.           puppetSprite(a, 0)
  25.         end repeat
  26.         go("blackout")
  27.         go("main", "main.dir")
  28.         abort()
  29.       end if
  30.     end if
  31.     puppetSprite(46, 1)
  32.     set the member of sprite 46 to member the memberNum of member "main menu" of castLib "graphics"
  33.     set the locH of sprite 46 to 14
  34.     updateStage()
  35.   else
  36.     set the locH of sprite 46 to -100
  37.     puppetSprite(46, 0)
  38.   end if
  39. end
  40.  
  41. on cursorSign
  42.   cursor([member 9 of castLib "cursors", member 10 of castLib "cursors"])
  43. end
  44.  
  45. on cursorSignOff
  46.   cursor(0)
  47. end
  48.  
  49. on tenthSecDel
  50.   startTimer()
  51.   repeat while the timer < 6
  52.     nothing()
  53.   end repeat
  54. end
  55.  
  56. on sixthSecDel
  57.   startTimer()
  58.   repeat while the timer < 10
  59.     nothing()
  60.   end repeat
  61. end
  62.  
  63. on thirdSecDel
  64.   startTimer()
  65.   repeat while the timer < 20
  66.     nothing()
  67.   end repeat
  68. end
  69.  
  70. on halfSecDel
  71.   startTimer()
  72.   repeat while the timer < 30
  73.     nothing()
  74.   end repeat
  75. end
  76.  
  77. on oneSecDel
  78.   startTimer()
  79.   repeat while the timer < 60
  80.     nothing()
  81.   end repeat
  82. end
  83.  
  84. on scrollingFrames
  85.   if the mouseDown then
  86.     if rollOver(14) then
  87.       puppetSprite(14, 1)
  88.       cursorSign()
  89.       set the member of sprite 14 to member (the memberNum of sprite 14 + 1) of castLib "graphics"
  90.       puppetSound("STEP")
  91.       updateStage()
  92.       sixthSecDel()
  93.       set the member of sprite 14 to member (the memberNum of sprite 14 - 1) of castLib "graphics"
  94.       updateStage()
  95.       puppetSprite(14, 0)
  96.       go(the frame - 1)
  97.     end if
  98.     if rollOver(15) then
  99.       puppetSprite(15, 1)
  100.       cursorSign()
  101.       set the member of sprite 15 to member (the memberNum of sprite 15 + 1) of castLib "graphics"
  102.       puppetSound("STEP")
  103.       updateStage()
  104.       sixthSecDel()
  105.       set the member of sprite 15 to member (the memberNum of sprite 15 - 1) of castLib "graphics"
  106.       updateStage()
  107.       puppetSprite(15, 0)
  108.       go(the frame + 1)
  109.     end if
  110.   else
  111.     cursor(0)
  112.     nothing()
  113.   end if
  114. end
  115.  
  116. on ReturnToMain
  117.   global happened
  118.   if the key = "o" then
  119.     if happened = EMPTY then
  120.       puppetSprite(48, 1)
  121.       puppetSound("CRASH")
  122.       set the locV of sprite 48 to -400
  123.       repeat while the locV of sprite 48 < 300
  124.         set the locV of sprite 48 to the locV of sprite 48 + 5
  125.         updateStage()
  126.       end repeat
  127.       startTimer()
  128.       repeat while the timer < 120
  129.         if the mouseDown then
  130.           exit repeat
  131.         end if
  132.         nothing()
  133.       end repeat
  134.       puppetSound("PUNCH")
  135.       set the member of sprite 48 to member (the memberNum of sprite 48 + 1) of castLib "graphics"
  136.       updateStage()
  137.       startTimer()
  138.       repeat while the timer < 400
  139.         if the mouseDown then
  140.           exit repeat
  141.         end if
  142.         nothing()
  143.       end repeat
  144.       puppetSound("OLOF")
  145.       repeat while the locH of sprite 48 < 850
  146.         set the locH of sprite 48 to the locH of sprite 48 + 15
  147.         updateStage()
  148.       end repeat
  149.       set happened to 1
  150.     else
  151.       nothing()
  152.       updateStage()
  153.       puppetSprite(48, 0)
  154.     end if
  155.   end if
  156. end
  157.