home *** CD-ROM | disk | FTP | other *** search
/ GelbeSeiten Berlin 1995 - 1996 / Image.iso / sprinter / shared.dir / 00600_Main.ls < prev    next >
Encoding:
Text File  |  1995-06-23  |  7.5 KB  |  310 lines

  1. on startMovie
  2. end
  3.  
  4. on enterFrame
  5.   global nowScreen, ScreenList, screenType
  6.   set screenInfo to getAt(ScreenList, nowScreen)
  7.   set screenType to item 3 of screenInfo
  8. end
  9.  
  10. on exitFrame
  11.   global screenType
  12.   if screenType = "standard" then
  13.     if the frameLabel = "<" then
  14.       go(the frame)
  15.     end if
  16.   else
  17.     if screenType = "nothing" then
  18.       goScreen("next")
  19.     else
  20.       if screenType = "loop" then
  21.         if the frameLabel = "<" then
  22.           go(marker(-1))
  23.         end if
  24.       else
  25.         if screenType = "splitScreen" then
  26.           splitScreen_exitFrame()
  27.         else
  28.           if screenType = "doubleSplit" then
  29.             doubleSplit_exitFrame()
  30.           else
  31.             if screenType = "animation" then
  32.               animation_exitFrame()
  33.             else
  34.               if screenType = "rollover" then
  35.                 rollover_exitFrame()
  36.               else
  37.                 if screenType = "tabelle" then
  38.                   tabelle_exitFrame()
  39.                 end if
  40.               end if
  41.             end if
  42.           end if
  43.         end if
  44.       end if
  45.     end if
  46.   end if
  47. end
  48.  
  49. on mouseDown
  50.   global screenType, click
  51.   set click to the clickOn
  52.   if screenType = "splitScreen" then
  53.     splitScreen_mouseDown()
  54.   else
  55.     if screenType = "doubleSplit" then
  56.       doubleSplit_mouseDown()
  57.     end if
  58.   end if
  59. end
  60.  
  61. on mouseUp
  62.   global screenType, click
  63.   set click to the clickOn
  64.   if the castNum of sprite click > 0 then
  65.     set clickName to the name of cast the castNum of sprite click
  66.     if clickName = "nextScreen" then
  67.       goScreen("next")
  68.     else
  69.       if clickName = "prevScreen" then
  70.         goScreen("prev")
  71.       else
  72.         if clickName = "menuScreen" then
  73.           goScreen("menu")
  74.         else
  75.           if clickName = "indexScreen" then
  76.             goScreen("index")
  77.           end if
  78.         end if
  79.       end if
  80.     end if
  81.   end if
  82.   if screenType = "animation" then
  83.     animation_mouseUp()
  84.   else
  85.     if screenType = "tabelle" then
  86.       tabelle_mouseUp()
  87.     end if
  88.   end if
  89. end
  90.  
  91. on splitScreen_exitFrame
  92.   if the stillDown = 1 then
  93.     go(the frame)
  94.   else
  95.     go(marker(0))
  96.   end if
  97. end
  98.  
  99. on splitScreen_mouseDown
  100.   global click, splitScreen
  101.   if (click >= splitScreen) and (click <= (splitScreen + 3)) then
  102.     go(the frame + click - (splitScreen - 1))
  103.   end if
  104. end
  105.  
  106. on doubleSplit_exitFrame
  107.   if (the stillDown = 1) and (the frame = (marker(0) + 1)) then
  108.     go(the frame)
  109.   else
  110.     if the frameLabel = "<" then
  111.       go(marker(-1))
  112.     else
  113.       if the frame > (marker(0) + 1) then
  114.         nothing()
  115.       else
  116.         go(marker(0))
  117.       end if
  118.     end if
  119.   end if
  120. end
  121.  
  122. on doubleSplit_mouseDown
  123.   global click, splitScreen
  124.   if click = splitScreen then
  125.     go(the frame + 1)
  126.   else
  127.     if click = (splitScreen + 1) then
  128.       go(the frame + 2)
  129.     end if
  130.   end if
  131. end
  132.  
  133. on animation_exitFrame
  134.   global animationButtons, animationDirection, animationMode
  135.   if char 1 of the frameLabel = "<" then
  136.     set animationDirection to -1
  137.     set animationMode to 0
  138.     go(the frame)
  139.   else
  140.     if the frameLabel <> EMPTY then
  141.       set animationDirection to 1
  142.       set animationMode to 0
  143.       go(the frame)
  144.     else
  145.       if animationMode = 0 then
  146.         go(the frame)
  147.       else
  148.         if animationDirection = -1 then
  149.           go(the frame - 1)
  150.         else
  151.           if animationDirection = 1 then
  152.             go(the frame + 1)
  153.           end if
  154.         end if
  155.       end if
  156.     end if
  157.   end if
  158. end
  159.  
  160. on animation_mouseUp
  161.   global click, animationButtons, animationDirection, animationMode
  162.   if the castNum of sprite click > 0 then
  163.     set clickName to the name of cast the castNum of sprite click
  164.     if clickName = "ani.rew" then
  165.       set animationDirection to -1
  166.       set animationMode to 0
  167.       go(the frame - 1)
  168.     else
  169.       if (clickName = "ani.start/stop") and (animationMode = 0) then
  170.         set animationMode to 1
  171.         go(the frame + animationDirection)
  172.       else
  173.         if (clickName = "ani.start/stop") and (animationMode = 1) then
  174.           set animationMode to 0
  175.           go(the frame)
  176.         else
  177.           if clickName = "ani.for" then
  178.             set animationDirection to 1
  179.             set animationMode to 0
  180.             go(the frame + 1)
  181.           end if
  182.         end if
  183.       end if
  184.     end if
  185.   end if
  186. end
  187.  
  188. on rollover_exitFrame
  189.   global rollOverStart
  190.   repeat with counter = 0 to 20
  191.     if the castNum of sprite (rollOverStart + counter) = 0 then
  192.       exit repeat
  193.     end if
  194.     if rollOver(rollOverStart + counter) = 1 then
  195.       go(marker(0) + counter)
  196.     end if
  197.   end repeat
  198.   go(the frame)
  199. end
  200.  
  201. on tabelle_exitFrame
  202.   global rollOverStart
  203.   if the frame > marker(0) then
  204.     repeat with counter = 0 to 20
  205.       if the castNum of sprite (rollOverStart + counter) = 0 then
  206.         exit repeat
  207.       end if
  208.       if rollOver(rollOverStart + counter) = 1 then
  209.         go(marker(0) + counter + 1)
  210.       end if
  211.     end repeat
  212.   end if
  213.   go(the frame)
  214. end
  215.  
  216. on tabelle_mouseUp
  217.   global click
  218.   if the castNum of sprite click > 0 then
  219.     set clickName to the name of cast the castNum of sprite click
  220.     if (clickName = "Special") and (the frame = marker(0)) then
  221.       go(the frame + 1)
  222.     else
  223.       if clickName = "Special" then
  224.         go(marker(0))
  225.       end if
  226.     end if
  227.   end if
  228. end
  229.  
  230. on goScreen screen
  231.   global nowScreen, indexScreen, menuScreen, ScreenList
  232.   put screen
  233.   hiliteButton()
  234.   if screen = "next" then
  235.     if nowScreen < count(ScreenList) then
  236.       set nowScreen to nowScreen + 1
  237.     end if
  238.   else
  239.     if screen = "prev" then
  240.       if nowScreen > 1 then
  241.         set nowScreen to nowScreen - 1
  242.       end if
  243.     else
  244.       if screen = "menu" then
  245.         go("abflug")
  246.         set nowScreen to menuScreen
  247.       else
  248.         if screen = "index" then
  249.           set nowScreen to indexScreen
  250.         else
  251.           if stringp(screen) = 0 then
  252.             set nowScreen to screen
  253.           else
  254.             if stringp(screen) = 1 then
  255.               repeat with counter = 1 to count(ScreenList)
  256.                 if item 1 of getAt(ScreenList, counter) = screen then
  257.                   set nowScreen to counter
  258.                   exit repeat
  259.                 end if
  260.               end repeat
  261.             end if
  262.           end if
  263.         end if
  264.       end if
  265.     end if
  266.   end if
  267.   set screenInfo to getAt(ScreenList, nowScreen)
  268.   set labelName to item 1 of screenInfo
  269.   set movieName to item 2 of screenInfo
  270.   if nowScreen > 1 then
  271.     set screenInfo to getAt(ScreenList, nowScreen - 1)
  272.     if item 3 of screenInfo = "animation" then
  273.       preLoad(marker(-2), marker(-1))
  274.     end if
  275.   end if
  276.   if nowScreen < count(ScreenList) then
  277.     set screenInfo to getAt(ScreenList, nowScreen + 1)
  278.     if item 3 of screenInfo = "animation" then
  279.       preLoad(marker(1), marker(2))
  280.     end if
  281.   end if
  282.   if the movieName = movieName then
  283.     put labelName
  284.     go(labelName)
  285.   else
  286.     go(labelName, movieName)
  287.   end if
  288. end
  289.  
  290. on hiliteButton
  291.   global click
  292.   if the castNum of sprite click > 0 then
  293.     set clickName to the name of cast the castNum of sprite click
  294.     put clickName
  295.     put click
  296.     repeat with counter = 26 to 28
  297.       if sprite click intersects counter then
  298.         set button to counter
  299.         set buttonName to the name of cast the castNum of sprite button
  300.         put buttonName
  301.       end if
  302.     end repeat
  303.     set the castNum of sprite click to the number of cast (clickName & ".shadow")
  304.     set the castNum of sprite button to the number of cast (buttonName & ".shadow")
  305.     updateStage()
  306.     set the castNum of sprite click to the number of cast clickName
  307.     set the castNum of sprite button to the number of cast buttonName
  308.   end if
  309. end
  310.