home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 September / PCD0995.ISO / files / intro.dir / 00001.ls next >
Encoding:
Text File  |  1995-01-24  |  4.9 KB  |  171 lines

  1. global attractLoopList, attractLoopDataList, maxBackgrounds, nextBackground, currentBackground, cQuickTime, gTime, lastClickTime, gPresentingTo, gPresentationLight, gPTimerSet, gPresentationTime, gRedSet, gYellowSet, gPresentationOver, lastBackgroundChange
  2.  
  3. on startMovie
  4.   set the preLoadEventAbort to 1
  5.   preLoadCast(76, 77)
  6.   memoryManIntro()
  7.   set lastClickTime to the timer
  8.   set cQuickTime to 16
  9.   set currentBackground to "AL1"
  10.   set attractLoopList to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
  11.   set attractLoopDataList to [[2, "a", 1, "b", 1], [3, "a", 1, "b", 1, "c", 1], [2, "a", 1, "b", 1], [2, "a", 1, "b", 1], [2, "a", 1, "b", 1], [2, "a", 1, "b", 1], [2, "a", 1, "b", 1], [2, "a", 1, "b", 1], [2, "a", 1, "b", 1], [2, "a", 1, "b", 1], [3, "a", 1, "b", 1, "c", 1], [2, "a", 1, "b", 1]]
  12.   set maxBackgrounds to count(attractLoopList)
  13.   set nextBackground to newBackground()
  14.   if not voidp(gPresentingTo) or (gPresentingTo <> EMPTY) then
  15.     put gPresentingTo into field "CompanyDisplay"
  16.   else
  17.     put " " into field "CompanyDisplay"
  18.     put "30" into field "Timer Amount"
  19.   end if
  20. end
  21.  
  22. on idle
  23. end
  24.  
  25. on waitFor seconds
  26.   set now to the timer
  27.   repeat while the timer < (now + (seconds * 60))
  28.     if the mouseDown then
  29.       exit
  30.     end if
  31.   end repeat
  32. end
  33.  
  34. on newBackground
  35.   global lastChoice
  36.   set numChoices to count(attractLoopList)
  37.   if numChoices = 0 then
  38.     set attractLoopList to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
  39.     set numChoices to maxBackgrounds
  40.   end if
  41.   if numChoices = maxBackgrounds then
  42.     set theOffset to random(maxBackgrounds)
  43.     set theChoice to getAt(attractLoopList, theOffset)
  44.     repeat while theChoice = lastChoice
  45.       set theOffset to random(maxBackgrounds)
  46.       set theChoice to getAt(attractLoopList, theOffset)
  47.     end repeat
  48.   else
  49.     if numChoices = 1 then
  50.       set lastChoice to getAt(attractLoopList, 1)
  51.       set theChoice to lastChoice
  52.       set theOffset to 1
  53.     else
  54.       set theOffset to random(numChoices)
  55.       set theChoice to getAt(attractLoopList, theOffset)
  56.     end if
  57.   end if
  58.   deleteAt(attractLoopList, theOffset)
  59.   return theChoice
  60. end
  61.  
  62. on preloadBackground whichOne
  63.   set loadList to getAt(attractLoopDataList, whichOne)
  64.   set theFrame to "AL" & string(whichOne)
  65.   preLoad(theFrame, theFrame)
  66.   set numScenes to getAt(loadList, 1)
  67.   repeat with x = 1 to numScenes
  68.     set theFrame to "AL" & string(whichOne) & getAt(loadList, x * 2)
  69.     set firstFrame to label(theFrame)
  70.     preLoad(firstFrame, firstFrame)
  71.   end repeat
  72. end
  73.  
  74. on changeBackground
  75.   set theFrame to "AL" & string(nextBackground)
  76.   set currentBackground to theFrame
  77.   puppetSprite(3, 0)
  78.   puppetSprite(4, 0)
  79.   puppetSprite(5, 0)
  80.   puppetSprite(6, 0)
  81.   puppetSprite(7, 0)
  82.   go(theFrame)
  83.   puppetSprite(3, 1)
  84.   puppetSprite(4, 1)
  85.   puppetSprite(5, 1)
  86.   puppetSprite(6, 1)
  87.   puppetSprite(7, 1)
  88.   set nextBackground to newBackground()
  89.   set lastBackgroundChange to the ticks
  90. end
  91.  
  92. on changeHotspot whichOne
  93.   set WhichSprite to the clickOn
  94.   set whichCast to the castNum of sprite WhichSprite
  95.   set myName to the name of cast whichCast
  96.   set theSpot to currentBackground & whichOne
  97.   set myNum to the last word in myName
  98.   put not value(myNum) into word the number of words in myName of myName
  99.   set the castNum of sprite WhichSprite to cast myName
  100.   set lastBackgroundChange to the ticks
  101.   go(theSpot)
  102. end
  103.  
  104. on puppetsOff
  105.   repeat with x = 3 to 7
  106.     puppetSprite(x, 0)
  107.   end repeat
  108. end
  109.  
  110. on delayfor n
  111.   startTimer()
  112.   repeat while the timer < n
  113.   end repeat
  114. end
  115.  
  116. on checkey
  117.   global delaytime
  118.   if the key = "0" then
  119.     set delaytime to 9
  120.   end if
  121.   if the key = "1" then
  122.     set delaytime to 8
  123.   end if
  124.   if the key = "2" then
  125.     set delaytime to 7
  126.   end if
  127.   if the key = "3" then
  128.     set delaytime to 6
  129.   end if
  130.   if the key = "4" then
  131.     set delaytime to 5
  132.   end if
  133.   if the key = "5" then
  134.     set delaytime to 4
  135.   end if
  136.   if the key = "6" then
  137.     set delaytime to 3
  138.   end if
  139.   if the key = "7" then
  140.     set delaytime to 2
  141.   end if
  142.   if the key = "8" then
  143.     set delaytime to 1
  144.   end if
  145.   if the key = "9" then
  146.     set delaytime to 0
  147.   end if
  148. end
  149.  
  150. on mainButtonSelect whichOne
  151.   global WhichSprite
  152.   set WhichSprite to the clickOn
  153.   puppetSprite(WhichSprite, 1)
  154.   set the castNum of sprite WhichSprite to the number of cast (the name of cast the castNum of sprite WhichSprite && "lit")
  155.   updateStage()
  156.   repeat while the stillDown
  157.   end repeat
  158.   puppetSprite(WhichSprite, 0)
  159.   set thePlaces to [#macromedia: "vision", #tools: "tools", #services: "support", #gallery: "gallery"]
  160.   set destination to getProp(thePlaces, whichOne)
  161.   go(1, destination)
  162. end
  163.  
  164. on memoryManIntro
  165.   preLoadCast(the number of cast "Volume Down", the number of cast "Quit")
  166.   preLoadCast(the number of cast "Volume Down lit", the number of cast "Quit lit")
  167.   preLoadCast(the number of cast "sound level 0", the number of cast "sound level 6")
  168.   preLoadCast(the number of cast "main macromedia", the number of cast "basic panel")
  169.   preLoadCast(the number of cast "basic panel grey")
  170. end
  171.