home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 September / PCD0995.ISO / files / tools.dir / 00362.ls < prev    next >
Encoding:
Text File  |  1995-01-25  |  13.0 KB  |  378 lines

  1. global cAudioLevel, gQTMovieSprite, tSectionPressed, gProductList, gLEDSprite, cDemoQT, demoQTstate, gVidPlaySprite, gVidPauseSprite, gSoundlevel, gMacDemoSprite, gWindowsDemoSprite, tProductSelect, tSectionSelect, lastSprite, gBlurbSprite, gUSASprite, gInternationalSprite, gOrderInfoSprite, gPlaySprite, gPauseSprite, gStopSprite, gFforwardSprite, gRewindSprite, gSeenTheDemo, gNumOProducts, gCounter, gReturnFromQuit, gLeftFromQTOver, gLeftFromQTDemo, gMovieTimeWhenLeft, gPTimerSet, gPresentationTime, gPresentationLight, gYellowSet, gRedSet, gLightColor
  2.  
  3. on startMovie
  4.   set the preLoadEventAbort to 1
  5.   set gQTMovieSprite to 6
  6.   set cAudioLevel to 46
  7.   set cDemoQT to 13
  8.   set demoQTstate to #stop
  9.   set lastSprite to 0
  10.   set gBlurbSprite to 5
  11.   set gUSASprite to 6
  12.   set gInternationalSprite to 7
  13.   set gOrderInfoSprite to 8
  14.   set gPlaySprite to 6
  15.   set gPauseSprite to 7
  16.   set gStopSprite to 8
  17.   set gFforwardSprite to 9
  18.   set gRewindSprite to 10
  19.   set gQTMovieSprite to 6
  20.   set gVidPlaySprite to 19
  21.   set gVidPauseSprite to 20
  22.   set gMacDemoSprite to 11
  23.   set gWindowsDemoSprite to 12
  24.   set gSeenTheDemo to 0
  25.   set gLEDSprite to 27
  26.   if gReturnFromQuit then
  27.     puppetSprite(gLEDSprite, 1)
  28.     set the castNum of sprite gLEDSprite to the number of cast (tProductSelect && "LED")
  29.     if gLeftFromQTOver then
  30.       set the movieRate of sprite gQTMovieSprite to 0
  31.       set the movieTime of sprite gQTMovieSprite to gMovieTimeWhenLeft
  32.       set overQTstate to #pause
  33.       puppetSprite(gVidPauseSprite, 1)
  34.       set the castNum of sprite gVidPauseSprite to the number of cast "VidPause lit"
  35.       set gLeftFromQTOver to 0
  36.     end if
  37.     if gLeftFromQTDemo then
  38.       set the castNum of sprite gPauseSprite to the number of cast "DemoPause lit"
  39.       set the movieRate of sprite cDemoQT to 0
  40.       set the movieTime of sprite cDemoQT to gMovieTimeWhenLeft
  41.       set demoQTstate to #pause
  42.       puppetSprite(gPauseSprite, 1)
  43.       set the castNum of sprite gPauseSprite to the number of cast "DemoPause lit"
  44.       set gLeftFromQTDemo to 0
  45.     end if
  46.     puppetSprite(cAudioLevel, 1)
  47.     set the castNum of sprite cAudioLevel to the number of cast ("sound level" && gSoundlevel)
  48.     updateStage()
  49.     set gReturnFromQuit to 0
  50.   end if
  51.   if gPTimerSet then
  52.     puppetSprite(gPresentationLight, 1)
  53.     set the castNum of sprite gPresentationLight to the number of cast gLightColor
  54.     updateStage()
  55.   end if
  56. end
  57.  
  58. on initTools
  59.   set tSectionPressed to 0
  60.   set tProductSelect to "nullSprite"
  61.   set tSectionSelect to EMPTY
  62.   set gProductList to ["authorware", "director", "macromodel", "action", "soundedit", "clipmedia", "freehand", "fontographer"]
  63.   set gNumOProducts to count(gProductList) + 1
  64.   set gCounter to 1
  65. end
  66.  
  67. on sectionSelect name
  68.   global tSectionPressed, tProductSelect, tSectionSelect
  69.   clearPuppets()
  70.   set currentSection to tSectionSelect
  71.   set currentSectionSprite to tSectionPressed
  72.   set WhichSprite to the clickOn
  73.   puppetSprite(WhichSprite, 1)
  74.   set whichCast to word 1 of the name of cast the castNum of sprite WhichSprite
  75.   set the castNum of sprite WhichSprite to the number of cast (whichCast && "down")
  76.   puppetSound("click")
  77.   if currentSection = name then
  78.     exit
  79.   else
  80.     set tSectionSelect to name
  81.     set tSectionPressed to WhichSprite
  82.     if currentSectionSprite <> 0 then
  83.       set offcast to word 1 of the name of cast the castNum of sprite currentSectionSprite
  84.       set the castNum of sprite currentSectionSprite to the number of cast offcast
  85.     end if
  86.     updateStage()
  87.   end if
  88.   if name = "data" then
  89.     if not gSeenTheDemo then
  90.       go("Data Intro")
  91.       exit
  92.     else
  93.       go(tProductSelect & tSectionSelect)
  94.       exit
  95.     end if
  96.   else
  97.     go(tProductSelect & tSectionSelect)
  98.   end if
  99. end
  100.  
  101. on productSelect direction
  102.   global tSectionPressed, tProductSelect, tSectionSelect
  103.   clearPuppets()
  104.   set WhichSprite to the clickOn
  105.   puppetSprite(WhichSprite, 1)
  106.   set whichCast to word 1 of the name of cast the castNum of sprite WhichSprite
  107.   set the castNum of sprite WhichSprite to the number of cast (whichCast && "down")
  108.   puppetSound("click")
  109.   updateStage()
  110.   if direction = #forward then
  111.     set gCounter to gCounter + 1
  112.     if gCounter = gNumOProducts then
  113.       set gCounter to 1
  114.     end if
  115.     set tProductSelect to getAt(gProductList, gCounter)
  116.     set the castNum of sprite gLEDSprite to the number of cast (tProductSelect && "LED")
  117.   else
  118.     set gCounter to gCounter - 1
  119.     if gCounter = 0 then
  120.       set gCounter to gNumOProducts - 1
  121.     end if
  122.     set tProductSelect to getAt(gProductList, gCounter)
  123.     set the castNum of sprite gLEDSprite to the number of cast (tProductSelect && "LED")
  124.   end if
  125.   updateStage()
  126. end
  127.  
  128. on demoSetup
  129.   global tProductSelect, tSectionSelect, gWhichGestalt, demoQTstate
  130.   puppetSprite(gMacDemoSprite, 1)
  131.   puppetSprite(gWindowsDemoSprite, 1)
  132.   if the machineType = 256 then
  133.     set gWhichGestalt to #win
  134.     set the castNum of sprite gMacDemoSprite to the number of cast "Mac"
  135.     set the castNum of sprite gWindowsDemoSprite to the number of cast "Win lit"
  136.   else
  137.     set gWhichGestalt to #mac
  138.     set the castNum of sprite gMacDemoSprite to the number of cast "Win"
  139.     set the castNum of sprite gWindowsDemoSprite to the number of cast "Mac lit"
  140.   end if
  141. end
  142.  
  143. on demoQTplay
  144.   global demoQTstate, cDemoQT
  145.   set WhichSprite to the clickOn
  146.   puppetSprite(WhichSprite, 1)
  147.   set the castNum of sprite gPlaySprite to the number of cast "DemoPlay lit"
  148.   set the movieRate of sprite cDemoQT to 1
  149.   set demoQTstate to #play
  150.   set the castNum of sprite gStopSprite to the number of cast "DemoStop"
  151.   set the castNum of sprite gPauseSprite to the number of cast "DemoPause"
  152.   updateStage()
  153. end
  154.  
  155. on demoQTpause
  156.   global demoQTstate, cDemoQT
  157.   set WhichSprite to the clickOn
  158.   puppetSprite(WhichSprite, 1)
  159.   set the castNum of sprite gPauseSprite to the number of cast "DemoPause lit"
  160.   if demoQTstate = #play then
  161.     set the movieRate of sprite cDemoQT to 0
  162.     set demoQTstate to #pause
  163.     set the castNum of sprite gPlaySprite to the number of cast "DemoPlay"
  164.     updateStage()
  165.   else
  166.     if demoQTstate = #pause then
  167.       set the movieRate of sprite cDemoQT to 1
  168.       set demoQTstate to #play
  169.       set the castNum of sprite gPauseSprite to the number of cast "DemoPause"
  170.       set the castNum of sprite gPlaySprite to the number of cast "DemoPlay lit"
  171.       updateStage()
  172.     end if
  173.   end if
  174. end
  175.  
  176. on demoQTstop
  177.   global demoQTstate, cDemoQT
  178.   set WhichSprite to the clickOn
  179.   puppetSprite(WhichSprite, 1)
  180.   set the movieRate of sprite cDemoQT to 0
  181.   set the movieTime of sprite cDemoQT to 0
  182.   set demoQTstate to #stop
  183.   set the castNum of sprite gStopSprite to the number of cast "DemoStop"
  184.   set the castNum of sprite gPauseSprite to the number of cast "DemoPause"
  185.   set the castNum of sprite gPlaySprite to the number of cast "DemoPlay"
  186.   updateStage()
  187. end
  188.  
  189. on demoQTfforward
  190.   global demoQTstate, cDemoQT
  191.   set WhichSprite to the clickOn
  192.   puppetSprite(WhichSprite, 1)
  193.   set the movieRate of sprite cDemoQT to 2
  194.   set the castNum of sprite gFforwardSprite to the number of cast "DemoForward lit"
  195.   repeat while the stillDown
  196.     updateStage()
  197.   end repeat
  198.   if the movieTime of sprite cDemoQT = the stopTime of sprite cDemoQT then
  199.     set the movieTime of sprite cDemoQT to 0
  200.   end if
  201.   if (demoQTstate = #pause) or (demoQTstate = #stop) then
  202.     set the movieRate of sprite cDemoQT to 0
  203.   else
  204.     set the movieRate of sprite cDemoQT to 1
  205.   end if
  206. end
  207.  
  208. on demoQTreverse
  209.   global demoQTstate, cDemoQT
  210.   set WhichSprite to the clickOn
  211.   puppetSprite(WhichSprite, 1)
  212.   set the castNum of sprite gRewindSprite to the number of cast "DemoRewind lit"
  213.   set the movieRate of sprite cDemoQT to -2
  214.   repeat while the stillDown
  215.     updateStage()
  216.   end repeat
  217.   if (demoQTstate = #pause) or (demoQTstate = #stop) then
  218.     set the movieRate of sprite cDemoQT to 0
  219.   else
  220.     set the movieRate of sprite cDemoQT to 1
  221.   end if
  222. end
  223.  
  224. on dataButtonClick
  225.   set WhichSprite to the clickOn
  226.   set variable to the castNum of sprite WhichSprite
  227.   set the castNum of sprite WhichSprite to variable + 1
  228.   puppetSound("click")
  229.   updateStage()
  230.   repeat while the stillDown
  231.   end repeat
  232.   set the castNum of sprite WhichSprite to variable
  233.   updateStage()
  234. end
  235.  
  236. on switchTool
  237.   set WhichSprite to the clickOn
  238.   puppetSprite(WhichSprite, 1)
  239.   if the castNum of sprite WhichSprite <> the number of cast "CLIPMEDIA TOOL" then
  240.     set the castNum of sprite WhichSprite to the castNum of sprite WhichSprite + 1
  241.   else
  242.     set the castNum of sprite WhichSprite to the number of cast "action tool"
  243.   end if
  244. end
  245.  
  246. on overQTplay action
  247.   global overQTstate, gQTMovieSprite
  248.   set WhichSprite to the clickOn
  249.   puppetSprite(WhichSprite, 1)
  250.   if action = #play then
  251.     set the castNum of sprite gVidPauseSprite to the number of cast "VidPause"
  252.     set the castNum of sprite the clickOn to the number of cast "VidPlay lit"
  253.     set the movieRate of sprite gQTMovieSprite to 1
  254.     set overQTstate to action
  255.     exit
  256.   end if
  257.   if action = #pause then
  258.     if overQTstate = #play then
  259.       set the movieRate of sprite gQTMovieSprite to 0
  260.       set the castNum of sprite the clickOn to the number of cast "VidPause lit"
  261.       set the castNum of sprite gVidPlaySprite to the number of cast "VidPlay"
  262.       set overQTstate to action
  263.     else
  264.       if overQTstate = #pause then
  265.         set the movieRate of sprite gQTMovieSprite to 1
  266.         set the castNum of sprite the clickOn to the number of cast "VidPause"
  267.         set the castNum of sprite gVidPlaySprite to the number of cast "VidPlay lit"
  268.         set overQTstate to #play
  269.       end if
  270.     end if
  271.     exit
  272.   end if
  273. end
  274.  
  275. on overSetUp
  276.   global overQTstate, gQTMovieSprite
  277.   puppetSprite(gVidPauseSprite, 1)
  278.   set overQTstate to #pause
  279. end
  280.  
  281. on dataButtonSelect WhichSprite, productchoice
  282.   puppetSound("click")
  283.   puppetSprite(WhichSprite, 1)
  284.   set oncast to word 1 of the name of cast the castNum of sprite WhichSprite
  285.   set the castNum of sprite WhichSprite to the number of cast (the name of cast oncast && "down")
  286.   updateStage()
  287.   repeat with n = 18 to 23
  288.     set offcast to word 1 of the name of cast the castNum of sprite n
  289.     if n <> WhichSprite then
  290.       set the castNum of sprite n to the number of cast offcast
  291.     end if
  292.   end repeat
  293.   set whichBullet to WhichSprite - 17
  294.   go(string(productchoice) & "Bullet" & whichBullet)
  295. end
  296.  
  297. on winMacSwitch WhichGestalt
  298.   global gWhichGestalt, tProductSelect, tSectionSelect
  299.   repeat with n = 8 to 10
  300.     set offcast to word 1 of the name of cast the castNum of sprite n
  301.     set the castNum of sprite n to the number of cast offcast
  302.   end repeat
  303.   if WhichGestalt = #mac then
  304.     go(tProductSelect & "DemoHold")
  305.   else
  306.     go(tProductSelect & "DemoWINHold")
  307.   end if
  308. end
  309.  
  310. on memoryman1
  311.   preLoadCast(the number of cast "left arrow blinker", the number of cast "order down")
  312. end
  313.  
  314. on memoryMan2
  315.   if not (the preLoad of cast the number of cast "Big Panel") then
  316.     preLoadCast(the number of cast "Big Panel")
  317.   end if
  318.   if not (the preLoad of cast the number of cast "Euphorhythm 3.AIFF") then
  319.     preLoadCast(the number of cast "Euphorhythm 3.AIFF")
  320.   end if
  321.   if not (the preLoad of cast the number of cast "genblur") then
  322.     preLoadCast(the number of cast "genblur")
  323.   end if
  324.   if not (the preLoad of cast the number of cast "over panel") then
  325.     preLoadCast(the number of cast "over panel")
  326.   end if
  327.   preLoadCast(the number of cast "VidPlay lit", the number of cast "TV frame")
  328.   if not (the preLoad of cast the number of cast "data panel") then
  329.     preLoadCast(the number of cast "data panel")
  330.   end if
  331.   preLoadCast(the number of cast "DataButton1 down", the number of cast "Outline box")
  332.   if not (the preLoad of cast the number of cast "Demo Panel") then
  333.     preLoadCast(the number of cast "Demo Panel")
  334.   end if
  335.   preLoadCast(the number of cast "DemoPlay Lit", the number of cast "Win Lit")
  336.   if not (the preLoad of cast the number of cast "order panel") then
  337.     preLoadCast(the number of cast "order panel")
  338.   end if
  339. end
  340.  
  341. on memoryMan3 whichPanel
  342.   if not (the preLoad of cast the number of cast "Big Panel") then
  343.     preLoadCast(the number of cast "Big Panel")
  344.   end if
  345.   if not (the preLoad of cast the number of cast "genblur") then
  346.     preLoadCast(the number of cast "genblur")
  347.   end if
  348.   if not (the preLoad of cast the number of cast (whichPanel && "panel")) then
  349.     preLoadCast(the number of cast (whichPanel && "panel"))
  350.   end if
  351.   preLoadCast(the number of cast "VidPlay lit", the number of cast "TV frame")
  352.   if whichPanel = "data" then
  353.     preLoadCast(the number of cast "DataButton1 down", the number of cast "Outline box")
  354.   end if
  355.   if whichPanel = "demo" then
  356.     preLoadCast(the number of cast "DemoPlay Lit", the number of cast "Win Lit")
  357.   end if
  358. end
  359.  
  360. on enterFrame
  361.   if gPTimerSet then
  362.     if (the timer > (gPresentationTime * 3600)) and not gRedSet then
  363.       set gLightColor to "Red timer light lit"
  364.       set the castNum of sprite gPresentationLight to the number of cast gLightColor
  365.       set gRedSet to 1
  366.       exit
  367.     end if
  368.     if (the timer > ((gPresentationTime * 3600) - 7200)) and not gYellowSet then
  369.       set gLightColor to "Yellow timer light lit"
  370.       set the castNum of sprite gPresentationLight to the number of cast gLightColor
  371.       set gYellowSet to 1
  372.     end if
  373.   end if
  374.   if the freeBytes < 300000 then
  375.     unLoad()
  376.   end if
  377. end
  378.