home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / autodesk / autodesk.exe / autodesk.DXR / 00001.ls next >
Encoding:
Text File  |  1994-12-17  |  8.0 KB  |  330 lines

  1. on RolloverOrb whichChannel, toHere
  2.   global gDispatched
  3.   if not rollOver(whichChannel) or gDispatched then
  4.     exit
  5.   end if
  6.   set myCast to the castNum of sprite whichChannel
  7.   set pushed to 0
  8.   set the castNum of sprite 27 to myCast + 20
  9.   set the visible of sprite 27 to 1
  10.   set the castNum of sprite whichChannel to myCast + 10
  11.   updateStage()
  12.   repeat while rollOver(whichChannel)
  13.     if the mouseDown then
  14.       set the castNum of sprite whichChannel to myCast
  15.       updateStage()
  16.       repeat while the mouseDown
  17.         if not rollOver(whichChannel) then
  18.           exit repeat
  19.         end if
  20.       end repeat
  21.       if rollOver(whichChannel) then
  22.         set pushed to 1
  23.       end if
  24.       exit repeat
  25.     end if
  26.   end repeat
  27.   set the visible of sprite 27 to 0
  28.   set the castNum of sprite whichChannel to myCast
  29.   updateStage()
  30.   if pushed then
  31.     puppetSprite(27, 0)
  32.     puppetSprite(30, 0)
  33.     set gDispatched to 1
  34.     go(toHere)
  35.   end if
  36. end
  37.  
  38. on RolloverBtn whichChannel, toHere
  39.   global gDispatched
  40.   if not rollOver(whichChannel) or gDispatched then
  41.     exit
  42.   end if
  43.   set myCast to the castNum of sprite whichChannel
  44.   set pushed to 0
  45.   set the castNum of sprite whichChannel to myCast + 10
  46.   updateStage()
  47.   repeat while rollOver(whichChannel)
  48.     if the mouseDown then
  49.       set the castNum of sprite whichChannel to myCast + 20
  50.       updateStage()
  51.       repeat while the mouseDown
  52.         if not rollOver(whichChannel) then
  53.           exit repeat
  54.         end if
  55.       end repeat
  56.       if rollOver(whichChannel) then
  57.         set pushed to 1
  58.       end if
  59.       exit repeat
  60.     end if
  61.   end repeat
  62.   set the castNum of sprite whichChannel to myCast
  63.   updateStage()
  64.   if pushed then
  65.     puppetSprite(30, 0)
  66.     set gDispatched to 1
  67.     go(toHere)
  68.   end if
  69. end
  70.  
  71. on animate10
  72.   puppetSprite(10, 1)
  73.   repeat with i = 413 to 420
  74.     startTimer()
  75.     set the castNum of sprite 10 to i
  76.     updateStage()
  77.     Waitkey2(1)
  78.   end repeat
  79.   puppetSprite(10, 0)
  80. end
  81.  
  82. on waitkey ticks
  83.   startTimer()
  84.   repeat while the timer < ticks
  85.     nothing()
  86.   end repeat
  87. end
  88.  
  89. on Waitkey2 ticks
  90.   repeat while the timer < ticks
  91.     nothing()
  92.   end repeat
  93. end
  94.  
  95. on ButtonHit whichChannel, toHere, killPuppet
  96.   global gDispatched
  97.   if not rollOver(whichChannel) or gDispatched then
  98.     exit
  99.   end if
  100.   set myCast to the castNum of sprite whichChannel
  101.   set pushed to 0
  102.   repeat while rollOver(whichChannel)
  103.     if the mouseDown then
  104.       set the castNum of sprite whichChannel to myCast + 10
  105.       updateStage()
  106.       repeat while the mouseDown
  107.         if not rollOver(whichChannel) then
  108.           exit repeat
  109.         end if
  110.       end repeat
  111.       if rollOver(whichChannel) then
  112.         set pushed to 1
  113.       end if
  114.       exit repeat
  115.     end if
  116.   end repeat
  117.   if pushed then
  118.     if killPuppet then
  119.       puppetSprite(30, 0)
  120.     end if
  121.     set gDispatched to 1
  122.     go(toHere)
  123.   end if
  124. end
  125.  
  126. on updateSound
  127.   if the soundEnabled then
  128.     puppetSound("martin")
  129.     set myCast to the castNum of sprite 30
  130.     set the castNum of sprite 30 to myCast - 10
  131.     updateStage()
  132.   else
  133.     set myCast to the castNum of sprite 30
  134.     set the castNum of sprite 30 to myCast + 10
  135.     updateStage()
  136.   end if
  137. end
  138.  
  139. on UpdateSound2
  140.   if the soundEnabled then
  141.     puppetSound("martin2")
  142.     set myCast to the castNum of sprite 30
  143.     set the castNum of sprite 30 to myCast - 10
  144.     updateStage()
  145.   else
  146.     set myCast to the castNum of sprite 30
  147.     set the castNum of sprite 30 to myCast + 10
  148.     updateStage()
  149.   end if
  150. end
  151.  
  152. on RolloverMenu whichChannel
  153.   global gDispatched, gHistoryRun
  154.   if not rollOver(whichChannel) or gDispatched then
  155.     exit
  156.   end if
  157.   set myCast to the castNum of sprite whichChannel
  158.   if whichChannel <= 5 then
  159.     set otherCast to the castNum of sprite (whichChannel + 4)
  160.   else
  161.     set otherCast to the castNum of sprite (whichChannel - 4)
  162.   end if
  163.   set pushed to 0
  164.   set the castNum of sprite whichChannel to myCast + 10
  165.   if whichChannel <= 5 then
  166.     set the castNum of sprite (whichChannel + 4) to otherCast + 10
  167.   else
  168.     set the castNum of sprite (whichChannel - 4) to otherCast + 10
  169.   end if
  170.   updateStage()
  171.   repeat while rollOver(whichChannel)
  172.     if the mouseDown then
  173.       set the castNum of sprite whichChannel to myCast + 20
  174.       if whichChannel <= 5 then
  175.         set the castNum of sprite (whichChannel + 4) to otherCast + 20
  176.       else
  177.         set the castNum of sprite (whichChannel - 4) to otherCast + 20
  178.       end if
  179.       updateStage()
  180.       repeat while the mouseDown
  181.         if not rollOver(whichChannel) then
  182.           exit repeat
  183.         end if
  184.       end repeat
  185.       if rollOver(whichChannel) then
  186.         set pushed to 1
  187.       end if
  188.       exit repeat
  189.     end if
  190.   end repeat
  191.   set the castNum of sprite whichChannel to myCast
  192.   if whichChannel <= 5 then
  193.     set the castNum of sprite (whichChannel + 4) to otherCast
  194.   else
  195.     set the castNum of sprite (whichChannel - 4) to otherCast
  196.   end if
  197.   updateStage()
  198.   if pushed then
  199.     puppetSprite(30, 0)
  200.     set gDispatched to 1
  201.     if (whichChannel = 2) or (whichChannel = 6) then
  202.       go("Products")
  203.     else
  204.       if (whichChannel = 3) or (whichChannel = 7) then
  205.         set gHistoryRun to 1
  206.         if the soundEnabled then
  207.           puppetSound("martin2")
  208.         end if
  209.         go("HistBegin")
  210.       else
  211.         if (whichChannel = 4) or (whichChannel = 8) then
  212.           DispatchPIF("MainMenu", "sedemo.pif")
  213.         else
  214.           DispatchPIF("MainMenu", EMPTY)
  215.         end if
  216.       end if
  217.     end if
  218.   end if
  219. end
  220.  
  221. on DispatchPIF returnWhere, aPIF
  222.   global gGoBack, gThePIF
  223.   set gGoBack to returnWhere
  224.   set gThePIF to aPIF
  225.   puppetSprite(30, 0)
  226.   go("Wait")
  227. end
  228.  
  229. on RolloverBtn2 whichChannel, toHere
  230.   global gDispatched
  231.   if not rollOver(whichChannel) or gDispatched then
  232.     exit
  233.   end if
  234.   set myCast to the castNum of sprite whichChannel
  235.   set pushed to 0
  236.   set the castNum of sprite whichChannel to myCast + 10
  237.   updateStage()
  238.   repeat while rollOver(whichChannel)
  239.     if the mouseDown then
  240.       set the castNum of sprite whichChannel to myCast + 20
  241.       updateStage()
  242.       repeat while the mouseDown
  243.         if not rollOver(whichChannel) then
  244.           exit repeat
  245.         end if
  246.       end repeat
  247.       if rollOver(whichChannel) then
  248.         set pushed to 1
  249.       end if
  250.       exit repeat
  251.     end if
  252.   end repeat
  253.   set the castNum of sprite whichChannel to myCast
  254.   updateStage()
  255.   if pushed then
  256.     set gDispatched to 1
  257.     go(toHere)
  258.   end if
  259. end
  260.  
  261. on startMovie
  262.   global gDemoRun, gHistoryRun
  263.   set gDemoRun to 0
  264.   set gHistoryRun to 0
  265.   if the colorDepth <> 8 then
  266.     alert("This program requires the video monitor to be set at 256 color display.")
  267.     updateStage()
  268.     halt()
  269.   end if
  270.   set dt to the memorysize / 1024
  271.   if dt < 3500 then
  272.     alert("This program requires at least 3.5 M of available RAM. Currently reported available memory :" && dt && "K.")
  273.     updateStage()
  274.     halt()
  275.   end if
  276.   set the volume of sound 1 to 200
  277.   set the volume of sound 2 to 245
  278.   set the preLoadEventAbort to 1
  279. end
  280.  
  281. on RolloverHelp
  282.   global gDispatched
  283.   if not rollOver(32) or gDispatched then
  284.     exit
  285.   end if
  286.   set myCast to the castNum of sprite 32
  287.   set pushed to 0
  288.   set the castNum of sprite 27 to myCast + 20
  289.   set the visible of sprite 27 to 1
  290.   set the castNum of sprite 32 to myCast + 10
  291.   updateStage()
  292.   repeat while rollOver(32)
  293.     nothing()
  294.   end repeat
  295.   set the visible of sprite 27 to 0
  296.   set the castNum of sprite 32 to myCast
  297.   updateStage()
  298. end
  299.  
  300. on PrintIt theFile
  301.   global gDispatched
  302.   if not rollOver(16) or gDispatched then
  303.     exit
  304.   end if
  305.   set myCast to the castNum of sprite 16
  306.   set pushed to 0
  307.   repeat while rollOver(16)
  308.     if the mouseDown then
  309.       set the castNum of sprite 16 to myCast + 10
  310.       updateStage()
  311.       repeat while the mouseDown
  312.         if not rollOver(16) then
  313.           exit repeat
  314.         end if
  315.       end repeat
  316.       if rollOver(16) then
  317.         set pushed to 1
  318.       end if
  319.       exit repeat
  320.     end if
  321.   end repeat
  322.   if pushed then
  323.     set the castNum of sprite 16 to myCast
  324.     open("print\" & theFile, "prntfile.exe")
  325.     if the soundEnabled then
  326.       puppetSound("martin")
  327.     end if
  328.   end if
  329. end
  330.