home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 1 / boot-disc-1996-08.iso / bootcd.dir / 00171_Script_171 < prev    next >
Text File  |  1996-07-02  |  8KB  |  251 lines

  1. --Just a simple bit of code by...
  2. --John F. Williams
  3. --Midnight Design
  4. --Moraga, CA
  5. --With a little honorary help from Kurt Cagle
  6. --6/28/96
  7.  
  8. on startMovie
  9.   global gLastSelected,gPopupSerialNum,gJustFinishedAnim,gXlibPath
  10.   set the actorlist=[]
  11.   setpuppets 1,48,false
  12.   set the colorDepth = 16
  13.   set gJustFinishedAnim = FALSE
  14.   set the soundLevel = 3
  15.   if not(the quickTimePresent) then
  16.     set theText = "BootCD makes use of Quicktime for Windows 2.11.  This program will launch the installer for Quicktime."
  17.     alert theText
  18.     open (the moviepath)&"Qtw211\Qt32.exe"
  19.     halt
  20.   end if
  21.   if the colorDepth = 8 then
  22.     set the colorDepth = 16 --for convenience on Macs only
  23.     set theText = "The interface of BootCD is designed to be viewed" &&¼
  24.                   "in 16-bit color (thousands of colors). Please" &&¼
  25.                   "set your monitor to this color depth and restart" &&¼
  26.                   "BootCD."
  27.     alert theText
  28.   end if
  29.   
  30.   -- Open external libraries
  31.   if the machineType = 256 then
  32.     set gXlibPath = "@\PCFILES\"
  33.     openxlib gXlibPath & "POPUP.DLL"
  34.     set gPopupSerialNum = "PPXW200-3134962971"
  35.   else
  36.     set gXlibPath = "@:Mac Specific Stuff:"
  37.     openxlib gXlibPath & "Popup XObject"
  38.     set gPopupSerialNum = "PPXM200-3076188936"
  39.   end if
  40.   
  41.   set gLastSelected = 0
  42.   
  43. end startMovie
  44.  
  45. on stopMovie
  46.   global gPopupObj,gXlibPath
  47.   if objectP(gPopupObj) then gPopupObj(mDispose)
  48.   if the machineType = 256 then
  49.     closexlib gXlibPath & "Popup.DLL"
  50.   else 
  51.     closexlib gXlibPath & "Popup XObject"
  52.   end if
  53. end stopMovie
  54.  
  55. on DoPopup whichPopup
  56.   global gPopupObj,gPopupSerialNum,gLastSelected,gSubCategory,gCategory
  57.   --Create and process the popup menus in the Workbench section
  58.   --whichPopup can be one of 3 integers currently, representing the following menus
  59.   --1 = Workbench:Utilities
  60.   --2 = Workbench:Resources
  61.   --3 = Workbench:Shareware
  62.   
  63.   if objectP(gPopupObj) then gPopupObj(mDispose)
  64.   -- Initialize the right popup menu
  65.   if whichPopup = 1 then
  66.     set gPopupObj = Popup(mNew, the text of member "Util Popup Menu")
  67.     set gCategory = "Utilities"
  68.   else if whichPopup = 2 then
  69.     set gPopupObj = Popup(mNew, the text of member "Resource Popup Menu")
  70.     set gCategory = "Resources"
  71.   else if whichPopup = 3 then
  72.     set gPopupObj = Popup(mNew, the text of member "Shareware Popup Menu")
  73.     set gCategory = "Shareware"
  74.   end if
  75.   
  76.   -- This popup registration line MUST be left in final code
  77.   gPopupObj(mRegister,gPopupSerialNum)
  78.   
  79.   --if the hilite of cast "auto-align" = true then
  80.   --  set itemAlign = gLastSelected
  81.   --  set h = the right of sprite (the clickOn) - 27
  82.   --  set v = the top of sprite (the clickOn)
  83.   --else
  84.   set itemAlign = 0
  85.   set h = the right of sprite (the clickOn) - 26
  86.   set v = the top of sprite (the clickOn) + 5
  87.   --end if
  88.   set result = gPopupObj(mPopupSpec,  h, v, itemAlign)
  89.   cursor 4
  90.   if result <> "" then
  91.     -- This will only grab the item number off of the fist item
  92.     set gLastSelected = value(result) --the item number
  93.     set gSubCategory = gPopupObj(mGetItem, result)  --the item text
  94.     put "gCategory =" && gCategory
  95.     put "gSubCategory =" && gSubCategory
  96.     set the memberNum of sprite 8 = the number of member (gCategory && "Text Frame")
  97.     set the memberNum of sprite 12 = the number of member "Workbench Install"
  98.     updateStage
  99.     go to frame "Workbench Selection"
  100.     set subMenuText = "WB" && gSubCategory && "Menu"
  101.     put "Looking for submenu in" && subMenuText
  102.     --put member subMenuText into field "Workbench Text"
  103.     set the text of member "Workbench Text" = the text of member subMenuText
  104.     --set the text of member "Workbench Text" = "Hello"
  105.   end if
  106.   cursor -1
  107. end DoPopup
  108.  
  109. on CheckMouseOvers
  110.   global gHiliteableButtons,gLastButton,gThisButton,gHilitedButton
  111.   set gThisButton = the mouseCast
  112.   --put "gThisButton =" && gThisButton && "and gHilitedButton =" && gHilitedButton
  113.   if (gHilitedButton = gThisButton) or (gLastButton = gThisButton) then
  114.     --if getOne (gHiliteableButtons,gThisButton) then
  115.     --mouseWithin (script gThisButton)
  116.     --end if
  117.   else
  118.     if getOne (gHiliteableButtons,gHilitedButton) then
  119.       repeat with btn in gHiliteableButtons
  120.         mouseExit (script btn)
  121.       end repeat
  122.       set gHilitedButton = gThisButton
  123.       --put "Just sent mouseExit to gHilitedButton" && gHilitedButton
  124.     end if
  125.     if getOne (gHiliteableButtons,gThisButton) then
  126.       repeat with btn in gHiliteableButtons
  127.         if btn<>gThisButton then
  128.           mouseExit (script btn)
  129.         end if
  130.       end repeat
  131.       mouseEnter (script gThisButton)
  132.       set gHilitedButton = gThisButton + 1
  133.       --put "Now sending mouseEnter to gThisButton" && gThisButton
  134.     end if
  135.     set gLastButton = gThisButton
  136.   end if
  137.   updateStage
  138. end CheckMouseOvers
  139.  
  140. on CheckRandomAnim animChoices,section
  141.   --if 2 secs has elapsed, start a new anim
  142.   global gJustFinishedAnim
  143.   
  144.   if gJustFinishedAnim then
  145.     startTimer
  146.     set gJustFinishedAnim = FALSE
  147.   else
  148.     if the timer > (2 * 60) then  
  149.       set nextAnim = section && "Anim" && random(animChoices)
  150.       go to frame nextAnim
  151.     end if
  152.   end if
  153.   
  154. end CheckRandomAnim
  155.  
  156. on TurnOnPuppets firstSprite,lastSprite
  157.   repeat with i = firstSprite to lastSprite
  158.     puppetSprite i,TRUE
  159.   end repeat
  160. end
  161.  
  162. on TurnOffPuppets firstSprite,lastSprite
  163.   repeat with i = firstSprite to lastSprite
  164.     puppetSprite i,FALSE
  165.   end repeat
  166. end
  167.  
  168. on pressbtn
  169.   set spritenum=the clickon
  170.   set upcast=the membernum of sprite spritenum
  171.   set downcastname=the name of member (upcast)&"down"
  172.   set downcast=the number of member (downcastname)
  173.   puppetsprite spritenum,1
  174.   set the membernum of sprite spritenum to downcast
  175.   updatestage
  176.   repeat while the mousedown
  177.   end repeat
  178.   set the membernum of sprite spritenum to upcast
  179.   updateStage
  180.   puppetsprite spritenum,false
  181.   return rollover(spritenum)
  182. end
  183.  
  184. on setpuppets startpuppet,endpuppet,state
  185.   repeat with spritenum=startpuppet to endpuppet
  186.     puppetsprite spritenum,state
  187.   end repeat
  188. end
  189.  
  190. on getObj objname
  191.   set oldDelimiter=the itemDelimiter
  192.   set the itemDelimiter=quote
  193.   set foundobj=0
  194.   repeat with obj in the actorlist
  195.     if item 2 of string(obj)=objname then
  196.       set foundobj=obj
  197.       exit repeat
  198.     end if
  199.   end repeat
  200.   set the itemDelimiter=oldDelimiter
  201.   return foundobj
  202. end
  203.  
  204. on SelectDemo whichmid
  205.   puppetSound 0
  206.   set soundlist=["Games":"LED01.AIF","Leisure":"LED05.AIF","Apps":"LED02.AIF"]
  207.   puppetSound getprop(soundlist,whichmid),1
  208.   repeat with index=1 to 3
  209.     set prop=getpropat(soundlist,index)
  210.     if prop=whichmid then
  211.       set the membernum of sprite index+1 to the number of member (prop&"Hi")
  212.     else
  213.       set the membernum of sprite index+1 to the number of member prop
  214.     end if
  215.   end repeat
  216.   UpdateStage
  217. end  
  218.  
  219. on SelectWorkbench whichmid
  220.   puppetSound 0
  221.   set soundlist=["Utilities":"LED01.AIF","Resources":"LED05.AIF","Shareware":"LED02.AIF"]
  222.   puppetSound getprop(soundlist,whichmid),1
  223.   repeat with index=1 to 3
  224.     set prop=getpropat(soundlist,index)
  225.     if prop=whichmid then
  226.       set the membernum of sprite index+1 to the number of member (prop&"Hi")
  227.     else
  228.       set the membernum of sprite index+1 to the number of member prop
  229.     end if
  230.   end repeat
  231.   UpdateStage
  232. end  
  233.  
  234.  
  235. on makeDescr startcast,endcast,prefix
  236.   repeat with index=startcast to endcast
  237.     set text=the text of member index
  238.     set the name of member index to prefix&(line 1 of text)
  239.   end repeat
  240. end
  241.  
  242. on getDrive
  243.   set drive=the moviepath
  244.   set oldDelimiter=the itemdelimiter
  245.   set the itemdelimiter=":"
  246.   set drive=(item 1 of drive)&":"
  247.   set the itemdelimiter=oldDelimiter
  248.   return drive
  249. end
  250.  
  251.