home *** CD-ROM | disk | FTP | other *** search
/ Better Homes & Gardens: …oking for Today - Chicken / Image.iso / pc / exe / multicom.dir / 00006_mainMovieScript.ls < prev    next >
Encoding:
Text File  |  1995-04-19  |  6.6 KB  |  252 lines

  1. on startMovie
  2.   global gTopicList, gTitleList, gRouterName, gDemo, gButtonBase, gButtonLast, gSpriteBase, gCastBase, gGoingToTopic, gStartCtrl, gHandCursor, gDemoDir, gCD
  3.   unLoad()
  4.   set gRouterName to gDemoDir & "\mdroute.exe"
  5.   set gGoingToTopic to 0
  6.   set gButtonBase to the number of cast "hilite"
  7.   set gButtonLast to the number of cast "wines"
  8.   set gButtonLast to gButtonLast + 1
  9.   set gStartCtrl to 3
  10.   set gHandCursor to [30, 31]
  11.   set gSpriteBase to 10
  12.   set gCastBase to 71
  13.   set gButtonBase to 50
  14.   set gTopicList to field "topicList"
  15.   set gTitleList to field "titles"
  16.   put EMPTY into field "currentTitle"
  17.   setPuppets(0)
  18.   repeat with i = 1 to 12
  19.     set vCastNum to gButtonBase + i
  20.     set vSpriteNum to gSpriteBase + i
  21.     set the castNum of sprite vSpriteNum to vCastNum
  22.   end repeat
  23. end
  24.  
  25. on stopMovie
  26.   global gDemo, gRouterName
  27. end
  28.  
  29. on doQuit
  30.   global gRouterName
  31.   set vCmd to gRouterName && "exit"
  32.   open(vCmd)
  33.   quit()
  34. end
  35.  
  36. on setTopicState fState
  37.   global gTopicState, gCurrentTopic
  38.   if fState = gTopicState then
  39.     exit
  40.   end if
  41.   set gTopicState to fState
  42.   set vTopicScreen to gCurrentTopic & fState
  43.   unLoad()
  44.   go(vTopicScreen)
  45.   updateStage()
  46. end
  47.  
  48. on setPuppets fState
  49.   set vLow to the puppet of sprite 1
  50.   set vHigh to the puppet of sprite 21
  51.   if (vHigh = fState) and (vLow = fState) then
  52.     exit
  53.   else
  54.     repeat with i = 1 to 21
  55.       puppetSprite(i, fState)
  56.     end repeat
  57.   end if
  58. end
  59.  
  60. on doInstall
  61.   global gCD, gCurrentTopic, gStr, gRouterName
  62.   if gCurrentTopic = "gardens" then
  63.     set gStr to gRouterName && gCD & "\MULTICOM\GARDENS\INSTALL\SETUP.EXE"
  64.   else
  65.     if gCurrentTopic = "parks" then
  66.       set gStr to gRouterName && gCD & "\MULTICOM\PARKS\INSTALL\SETUP.EXE"
  67.     else
  68.       if gCurrentTopic = "cookbook" then
  69.         set gStr to gRouterName && gCD & "\MULTICOM\CKBOOK\INSTALL\SETUP.EXE"
  70.       else
  71.         if gCurrentTopic = "astro" then
  72.           set gStr to gRouterName && gCD & "\MULTICOM\ASTROSRC\INSTALL\SETUP.EXE"
  73.         else
  74.           if gCurrentTopic = "space" then
  75.             set gStr to gRouterName && gCD & "\MULTICOM\SPACE\INSTALL\SETUP.EXE"
  76.           else
  77.             if gCurrentTopic = "planets" then
  78.               set gStr to gRouterName && gCD & "\MULTICOM\PLANETS\INSTALL\SETUP.EXE"
  79.             else
  80.               if gCurrentTopic = "oz" then
  81.                 set gStr to gRouterName && gCD & "\MULTICOM\OZ\INSTALL\SETUP.EXE"
  82.               else
  83.                 if gCurrentTopic = "dandy" then
  84.                   set gStr to gRouterName && gCD & "\MULTICOM\DNDYDINO\INSTALL\SETUP.EXE"
  85.                 end if
  86.               end if
  87.             end if
  88.           end if
  89.         end if
  90.       end if
  91.     end if
  92.   end if
  93.   set vFrameNo to the frame - 1
  94.   go(vFrameNo)
  95.   set vPlaceMark to " " & the frameLabel
  96.   put vPlaceMark after gStr
  97.   go("samplerExit")
  98.   open(gStr)
  99.   quit()
  100. end
  101.  
  102. on setCtrlCursor
  103.   global gStartCtrl, gHandCursor
  104.   repeat with i = 1 to 5
  105.     set vSprite to i + gStartCtrl - 1
  106.     set the cursor of sprite vSprite to gHandCursor
  107.   end repeat
  108. end
  109.  
  110. on bTitleInstalled fTopic
  111.   global gDemo
  112.   set vTopic to strConvertName(fTopic)
  113.   set vResult to gDemo(mGetIniEntry, "mcomdemo.ini", "applications", vTopic)
  114.   if vResult = "yes" then
  115.     return 1
  116.   else
  117.     return 0
  118.   end if
  119. end
  120.  
  121. on strConvertName fName
  122.   if fName = "astro" then
  123.     set vReturn to "astrosrc"
  124.   else
  125.     if fName = "cookbook" then
  126.       set vReturn to "ckbook"
  127.     else
  128.       if fName = "dandy" then
  129.         set vReturn to "dndydino"
  130.       else
  131.         if fName = "gardens" then
  132.           set vReturn to "gardens"
  133.         else
  134.           if fName = "oz" then
  135.             set vReturn to "oz"
  136.           else
  137.             if fName = "parks" then
  138.               set vReturn to "parks"
  139.             else
  140.               if fName = "planets" then
  141.                 set vReturn to "planets"
  142.               else
  143.                 if fName = "space" then
  144.                   set vReturn to "space"
  145.                 end if
  146.               end if
  147.             end if
  148.           end if
  149.         end if
  150.       end if
  151.     end if
  152.   end if
  153.   return vReturn
  154. end
  155.  
  156. on strFullName fName
  157.   if fName = "astro" then
  158.     set vIndex to 5
  159.   else
  160.     if fName = "cookbook" then
  161.       set vIndex to 3
  162.     else
  163.       if fName = "dandy" then
  164.         set vIndex to 10
  165.       else
  166.         if fName = "gardens" then
  167.           set vIndex to 1
  168.         else
  169.           if fName = "oz" then
  170.             set vIndex to 9
  171.           else
  172.             if fName = "parks" then
  173.               set vIndex to 2
  174.             else
  175.               if fName = "planets" then
  176.                 set vIndex to 8
  177.               else
  178.                 if fName = "space" then
  179.                   set vIndex to 6
  180.                 end if
  181.               end if
  182.             end if
  183.           end if
  184.         end if
  185.       end if
  186.     end if
  187.   end if
  188.   set vLine to line vIndex of field "titles"
  189.   return vLine
  190. end
  191.  
  192. on doGroup fStart, fEnd, fState
  193.   repeat with i = fStart to fEnd
  194.     set vSave to the puppet of sprite i
  195.     puppetSprite(i, 1)
  196.     set the visible of sprite i to fState
  197.     puppetSprite(i, vSave)
  198.   end repeat
  199.   updateStage()
  200. end
  201.  
  202. on gotoTitle
  203.   global gCD, gCurrentTopic, gDemoDir, gRouterName
  204.   if gCurrentTopic = "gardens" then
  205.     set vArg to gDemoDir & "\GARDENS\gardens.iw"
  206.     set vProg to gDemoDir & "\present\present.exe"
  207.   else
  208.     if gCurrentTopic = "parks" then
  209.       set vArg to gDemoDir & "\parks\parks.iw"
  210.       set vProg to gDemoDir & "\present\present.exe"
  211.     else
  212.       if gCurrentTopic = "cookbook" then
  213.         set vArg to gDemoDir & "\ckbook\ckbook.iw"
  214.         set vProg to gDemoDir & "\present\present.exe"
  215.       else
  216.         if gCurrentTopic = "astro" then
  217.           set vArg to gDemoDir & "\astrosrc\astro.tbk"
  218.           set vProg to gDemoDir & "\tbook\tbook.exe"
  219.         else
  220.           if gCurrentTopic = "space" then
  221.             set vArg to gDemoDir & "\space\master\space.iw"
  222.             set vProg to gDemoDir & "\present\present.exe"
  223.           else
  224.             if gCurrentTopic = "planets" then
  225.               set vArg to gDemoDir & "\planets\planets.iw"
  226.               set vProg to gDemoDir & "\present\present.exe"
  227.             else
  228.               if gCurrentTopic = "oz" then
  229.                 set vArg to EMPTY
  230.                 set vProg to gDemoDir & "\oz\oz.exe"
  231.               else
  232.                 if gCurrentTopic = "dandy" then
  233.                   set vArg to EMPTY
  234.                   set vProg to gDemoDir & "\dndydino\dandy.exe"
  235.                 end if
  236.               end if
  237.             end if
  238.           end if
  239.         end if
  240.       end if
  241.     end if
  242.   end if
  243.   set vFrameNo to the frame - 1
  244.   go(vFrameNo)
  245.   set vPlaceMark to the frameLabel
  246.   set vCmd to gRouterName && vProg && vArg && vPlaceMark
  247.   go("samplerExit")
  248.   put vCmd
  249.   open(vCmd)
  250.   quit()
  251. end
  252.