home *** CD-ROM | disk | FTP | other *** search
/ Better Homes & Gardens: …oking for Today - Chicken / Image.iso / pc / intro.dxr / 00001.ls next >
Encoding:
Text File  |  1995-11-20  |  15.6 KB  |  370 lines

  1. on startMovie
  2.   global gCurrentBook, gCFTBook, gIntro2Movie, gCurrentOrAll, gFirstRun, gFirstMainRun, gFirstChooserRun, gFirstPersonalRun, gFirstRecipeRun, gFirstUtilityRun, gFirstPlannerRun, gFirstVideoRun
  3.   set gCurrentBook to gCFTBook
  4.   set gCurrentOrAll to "Current"
  5.   CFTSetUp()
  6.   set gFirstRun to 1
  7.   set gFirstMainRun to 1
  8.   set gFirstChooserRun to 1
  9.   set gFirstPersonalRun to 1
  10.   set gFirstRecipeRun to 1
  11.   set gFirstUtilityRun to 1
  12.   set gFirstPlannerRun to 1
  13.   set gFirstVideoRun to 1
  14.   set gIntro2Movie to "Intro2" & char 1 of gCFTBook
  15.   startTimer()
  16. end
  17.  
  18. on mouseUp
  19.   global gIntro2Movie
  20.   go(1, the pathName & gIntro2Movie)
  21.   dontPassEvent()
  22. end
  23.  
  24. on buildRecipesAvailable
  25.   global gRecipesAvailableList, gMyRecipesList, gCFTBook, gSearchList, gOwnsHealthy, gOwnsGAC, gOwnsFandW, gOwnsCFTPasta, gOwnsCFTVegi, gOwnsCFTStir, gOwnsCFTChick
  26.   set config to EMPTY
  27.   if the machineType <> 256 then
  28.     openXLib("prefpath")
  29.     set prefObj to prefpath(mnew)
  30.     set prefName to prefObj(mprefpath)
  31.     if objectp(fileObj) then
  32.       fileObj(mdispose)
  33.     end if
  34.     set fileObj to FileIO(mnew, "read", prefName)
  35.     if objectp(fileObj) then
  36.       repeat with i = 1 to 10
  37.         put fileObj(mReadChar) after config
  38.       end repeat
  39.     else
  40.       set config to "0000000000"
  41.     end if
  42.     if objectp(fileObj) then
  43.       fileObj(mdispose)
  44.     end if
  45.     set driveLetter to char 1 of config
  46.     set gHardDriveP to integer(char 2 of config)
  47.     set gOwnsHealthy to integer(char 3 of config)
  48.     set gOwnsGAC to integer(char 4 of config)
  49.     set gOwnsBundle to integer(char 5 of config)
  50.     set gOwnsCFTPasta to integer(char 6 of config)
  51.     set gOwnsCFTVegi to integer(char 7 of config)
  52.     set gOwnsCFTStir to integer(char 8 of config)
  53.     set gOwnsCFTChick to integer(char 9 of config)
  54.     set gOwnsFandW to integer(char 10 of config)
  55.   end if
  56.   if gCFTBook = "Pasta" then
  57.     set gOwnsCFTPasta to 1
  58.   else
  59.     if gCFTBook = "Vegi" then
  60.       set gOwnsCFTVegi to 1
  61.     else
  62.       if gCFTBook = "Stir" then
  63.         set gOwnsStir to 1
  64.       else
  65.         if gCFTBook = "Chick" then
  66.           set gOwnsChick to 1
  67.         else
  68.           if gCFTBook = "Bundle" then
  69.             set gOwnsBundle to 1
  70.           end if
  71.         end if
  72.       end if
  73.     end if
  74.   end if
  75.   if gOwnsBundle = 1 then
  76.     set gOwnsCFTPasta to 1
  77.     set gOwnsCFTVegi to 1
  78.     set gOwnsCFTStir to 1
  79.     set gOwnsCFTChick to 1
  80.   end if
  81.   set gRecipesAvailableList to []
  82.   if gOwnsHealthy then
  83.     repeat with i = 1 to 426
  84.       add(gRecipesAvailableList, i)
  85.     end repeat
  86.   end if
  87.   if gOwnsGAC then
  88.     repeat with i = 1001 to 1453
  89.       add(gRecipesAvailableList, i)
  90.     end repeat
  91.     repeat with i = 1501 to 1612
  92.       add(gRecipesAvailableList, i)
  93.     end repeat
  94.   end if
  95.   if gOwnsCFTPasta then
  96.     repeat with i = 1701 to 1767
  97.       add(gRecipesAvailableList, i)
  98.     end repeat
  99.     repeat with i = 1769 to 1772
  100.       add(gRecipesAvailableList, i)
  101.     end repeat
  102.   end if
  103.   if gOwnsCFTVegi then
  104.     repeat with i = 1801 to 1868
  105.       add(gRecipesAvailableList, i)
  106.     end repeat
  107.   end if
  108.   if gOwnsCFTStir then
  109.     repeat with i = 1901 to 1968
  110.       add(gRecipesAvailableList, i)
  111.     end repeat
  112.   end if
  113.   if gOwnsCFTChick then
  114.     repeat with i = 2001 to 2068
  115.       add(gRecipesAvailableList, i)
  116.     end repeat
  117.   end if
  118.   if gOwnsFandW then
  119.     repeat with i = 3000 to 3165
  120.       add(gRecipesAvailableList, i)
  121.     end repeat
  122.   end if
  123.   set gMyRecipesList to []
  124.   if gCFTBook = "Pasta" then
  125.     repeat with i = 1701 to 1767
  126.       add(gMyRecipesList, i)
  127.     end repeat
  128.     repeat with i = 1769 to 1772
  129.       add(gMyRecipesList, i)
  130.     end repeat
  131.   else
  132.     if gCFTBook = "Vegi" then
  133.       repeat with i = 1801 to 1868
  134.         add(gMyRecipesList, i)
  135.       end repeat
  136.     else
  137.       if gCFTBook = "Stir" then
  138.         repeat with i = 1901 to 1968
  139.           add(gMyRecipesList, i)
  140.         end repeat
  141.       else
  142.         if gCFTBook = "Chick" then
  143.           repeat with i = 2001 to 2068
  144.             add(gMyRecipesList, i)
  145.           end repeat
  146.         else
  147.           if gCFTBook = "Bundle" then
  148.             repeat with i = 1701 to 1767
  149.               add(gMyRecipesList, i)
  150.             end repeat
  151.             repeat with i = 1769 to 1772
  152.               add(gMyRecipesList, i)
  153.             end repeat
  154.             repeat with i = 1801 to 1868
  155.               add(gMyRecipesList, i)
  156.             end repeat
  157.             repeat with i = 1901 to 1968
  158.               add(gMyRecipesList, i)
  159.             end repeat
  160.             repeat with i = 2001 to 2068
  161.               add(gMyRecipesList, i)
  162.             end repeat
  163.           end if
  164.         end if
  165.       end if
  166.     end if
  167.   end if
  168.   set gSearchList to gMyRecipesList
  169. end
  170.  
  171. on CFTSetUp
  172.   global gOriginalColorDepth, gCurrentRecipe, gCurrentRecipeFrame, gRecipeIDDB, gTermIDDB, gUtensilIDDB, gFoodIDDB, gStandardIDDB, gVideoIDDB, gTableIDDB, gPersonalIDDB, gShowAllNotes, gPastaBrowser, gVegiBrowser, gStirBrowser, gChickBrowser, gRecipesFoundBrowser, gBrowseChooser, gSendPlanner, gSendShopping, gSendPersonal, gShoppingTitles, gShoppingIngredients, gShoppingServings, gShoppingQuantities, gScaledIngredients, gScaledServings, gAllQuantities, gAllUnits, gAllRests, gPlannerRecipes, gPersonalRecipes
  173.   cursor(4)
  174.   cleanLegos()
  175.   set gOriginalColorDepth to the colorDepth
  176.   set the colorDepth to 8
  177.   DBSetUp()
  178.   set gCurrentRecipeFrame to "recipe1"
  179.   set gPersonalIDDB to [:]
  180.   set gShowAllNotes to 0
  181.   set gRecipeIDDB to value(field "recipeIDDB")
  182.   set gCFTRecipeIDDB to value(field "CFTrecipeIDDB")
  183.   set gfandwIDDB to value(field "fandwIDDB")
  184.   repeat with i = 1 to 67
  185.     addProp(gRecipeIDDB, getOne(gCFTRecipeIDDB, 1700 + i), i + 1700)
  186.   end repeat
  187.   repeat with i = 69 to 72
  188.     addProp(gRecipeIDDB, getOne(gCFTRecipeIDDB, 1700 + i), i + 1700)
  189.   end repeat
  190.   repeat with i = 1 to 68
  191.     addProp(gRecipeIDDB, getOne(gCFTRecipeIDDB, 1800 + i), i + 1800)
  192.   end repeat
  193.   repeat with i = 1 to 68
  194.     addProp(gRecipeIDDB, getOne(gCFTRecipeIDDB, 1900 + i), i + 1900)
  195.   end repeat
  196.   repeat with i = 1 to 68
  197.     addProp(gRecipeIDDB, getOne(gCFTRecipeIDDB, 2000 + i), i + 2000)
  198.   end repeat
  199.   repeat with i = 1 to 223
  200.     addProp(gRecipeIDDB, getOne(gfandwIDDB, 2999 + i), i + 2999)
  201.   end repeat
  202.   set gfandwIDDB to []
  203.   set gCFTRecipeIDDB to []
  204.   buildRecipesAvailable()
  205.   set gTermIDDB to value(field "termIDDB")
  206.   set gUtensilIDDB to value(field "utensilIDDB")
  207.   set gFoodIDDB to value(field "foodIDDB")
  208.   set gStandardIDDB to value(field "full standard ingredients")
  209.   put gStandardIDDB
  210.   set gVideoIDDB to value(field "videoIDDB")
  211.   set gTableIDDB to value(field "tableIDDB")
  212.   set gPastaBrowser to value(field "PastaBrowser")
  213.   set gVegiBrowser to value(field "VegiBrowser")
  214.   set gStirBrowser to value(field "StirBrowser")
  215.   set gChickBrowser to value(field "ChickBrowser")
  216.   set gRecipesFoundBrowser to [:]
  217.   set gBrowseChooser to 0
  218.   set gSendPlanner to 0
  219.   set gSendShopping to 0
  220.   set gSendPersonal to 0
  221.   set gShoppingTitles to []
  222.   set gShoppingIngredients to []
  223.   set gShoppingServings to []
  224.   set gShoppingQuantities to []
  225.   set gScaledIngredients to []
  226.   set gScaledServings to []
  227.   set gAllQuantities to []
  228.   set gAllUnits to []
  229.   set gAllRests to []
  230.   set gPlannerRecipes to []
  231.   set gPersonalRecipes to []
  232.   if the machineType = 256 then
  233.     append(the searchPath, the pathName & "PCDB\")
  234.     append(the searchPath, the pathName & "LILPIC\BEAUTY\PASTA\")
  235.     append(the searchPath, the pathName & "LILPIC\BEAUTY\VEGI\")
  236.     append(the searchPath, the pathName & "LILPIC\BEAUTY\STIR\")
  237.     append(the searchPath, the pathName & "LILPIC\BEAUTY\CHICK\")
  238.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE029\")
  239.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE059\")
  240.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE089\")
  241.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE119\")
  242.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE149\")
  243.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE179\")
  244.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE209\")
  245.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE239\")
  246.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE269\")
  247.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE299\")
  248.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE329\")
  249.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE359\")
  250.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE029\")
  251.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE389\")
  252.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE419\")
  253.     append(the searchPath, the pathName & "LILPIC\RECIPES\GUIDE449\")
  254.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS029\")
  255.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS059\")
  256.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS089\")
  257.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS119\")
  258.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS149\")
  259.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS179\")
  260.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS209\")
  261.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS239\")
  262.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS269\")
  263.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS299\")
  264.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS329\")
  265.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS359\")
  266.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS029\")
  267.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS389\")
  268.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS419\")
  269.     append(the searchPath, the pathName & "LILPIC\TERMS\TERMS449\")
  270.     append(the searchPath, the pathName & "PIC\BEAUTY\PASTA\")
  271.     append(the searchPath, the pathName & "PIC\BEAUTY\VEGI\")
  272.     append(the searchPath, the pathName & "PIC\BEAUTY\STIR\")
  273.     append(the searchPath, the pathName & "PIC\BEAUTY\CHICK\")
  274.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE029\")
  275.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE059\")
  276.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE089\")
  277.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE119\")
  278.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE149\")
  279.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE179\")
  280.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE209\")
  281.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE239\")
  282.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE269\")
  283.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE299\")
  284.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE329\")
  285.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE359\")
  286.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE029\")
  287.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE389\")
  288.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE419\")
  289.     append(the searchPath, the pathName & "PIC\RECIPES\GUIDE449\")
  290.     append(the searchPath, the pathName & "PIC\TERMS\TERMS029\")
  291.     append(the searchPath, the pathName & "PIC\TERMS\TERMS059\")
  292.     append(the searchPath, the pathName & "PIC\TERMS\TERMS089\")
  293.     append(the searchPath, the pathName & "PIC\TERMS\TERMS119\")
  294.     append(the searchPath, the pathName & "PIC\TERMS\TERMS149\")
  295.     append(the searchPath, the pathName & "PIC\TERMS\TERMS179\")
  296.     append(the searchPath, the pathName & "PIC\TERMS\TERMS209\")
  297.     append(the searchPath, the pathName & "PIC\TERMS\TERMS239\")
  298.     append(the searchPath, the pathName & "PIC\TERMS\TERMS269\")
  299.     append(the searchPath, the pathName & "PIC\TERMS\TERMS299\")
  300.     append(the searchPath, the pathName & "PIC\TERMS\TERMS329\")
  301.     append(the searchPath, the pathName & "PIC\TERMS\TERMS359\")
  302.     append(the searchPath, the pathName & "PIC\TERMS\TERMS029\")
  303.     append(the searchPath, the pathName & "PIC\TERMS\TERMS389\")
  304.     append(the searchPath, the pathName & "PIC\TERMS\TERMS419\")
  305.     append(the searchPath, the pathName & "PIC\TERMS\TERMS449\")
  306.     append(the searchPath, the pathName & "PIC\VIDEO\")
  307.     append(the searchPath, the pathName & "PIC\VIDEO\VIDEO1\")
  308.     append(the searchPath, the pathName & "PIC\VIDEO\VIDEO2\")
  309.     append(the searchPath, the pathName & "PIC\VIDEO\VIDEO3\")
  310.     append(the searchPath, the pathName & "PIC\VIDEO\VIDEO4\")
  311.     append(the searchPath, the pathName & "PIC\UTENSILS\UTENSIL1\")
  312.     append(the searchPath, the pathName & "PIC\UTENSILS\UTENSIL2\")
  313.     append(the searchPath, the pathName & "VID\")
  314.     append(the searchPath, the pathName & "VID\VIDEO1\")
  315.     append(the searchPath, the pathName & "VID\VIDEO2\")
  316.     append(the searchPath, the pathName & "VID\VIDEO3\")
  317.     append(the searchPath, the pathName & "VID\VIDEO4\")
  318.   else
  319.     append(the searchPath, the pathName & "MACDB:")
  320.     append(the searchPath, the pathName & "PIC:BEAUTY:PASTA:")
  321.     append(the searchPath, the pathName & "PIC:BEAUTY:VEGI:")
  322.     append(the searchPath, the pathName & "PIC:BEAUTY:STIR:")
  323.     append(the searchPath, the pathName & "PIC:BEAUTY:CHICK:")
  324.     append(the searchPath, the pathName & "PIC:VIDEO:")
  325.     append(the searchPath, the pathName & "PIC:VIDEO:VIDEO1:")
  326.     append(the searchPath, the pathName & "PIC:VIDEO:VIDEO2:")
  327.     append(the searchPath, the pathName & "PIC:VIDEO:VIDEO3:")
  328.     append(the searchPath, the pathName & "PIC:VIDEO:VIDEO4:")
  329.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE059:")
  330.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE089:")
  331.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE119:")
  332.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE149:")
  333.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE179:")
  334.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE209:")
  335.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE239:")
  336.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE269:")
  337.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE299:")
  338.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE329:")
  339.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE359:")
  340.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE029:")
  341.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE389:")
  342.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE419:")
  343.     append(the searchPath, the pathName & "PIC:RECIPES:GUIDE449:")
  344.     append(the searchPath, the pathName & "PIC:TERMS:TERMS029:")
  345.     append(the searchPath, the pathName & "PIC:TERMS:TERMS059:")
  346.     append(the searchPath, the pathName & "PIC:TERMS:TERMS089:")
  347.     append(the searchPath, the pathName & "PIC:TERMS:TERMS119:")
  348.     append(the searchPath, the pathName & "PIC:TERMS:TERMS149:")
  349.     append(the searchPath, the pathName & "PIC:TERMS:TERMS179:")
  350.     append(the searchPath, the pathName & "PIC:TERMS:TERMS209:")
  351.     append(the searchPath, the pathName & "PIC:TERMS:TERMS239:")
  352.     append(the searchPath, the pathName & "PIC:TERMS:TERMS269:")
  353.     append(the searchPath, the pathName & "PIC:TERMS:TERMS299:")
  354.     append(the searchPath, the pathName & "PIC:TERMS:TERMS329:")
  355.     append(the searchPath, the pathName & "PIC:TERMS:TERMS359:")
  356.     append(the searchPath, the pathName & "PIC:TERMS:TERMS029:")
  357.     append(the searchPath, the pathName & "PIC:TERMS:TERMS389:")
  358.     append(the searchPath, the pathName & "PIC:TERMS:TERMS419:")
  359.     append(the searchPath, the pathName & "PIC:TERMS:TERMS449:")
  360.     append(the searchPath, the pathName & "PIC:UTENSILS:UTENSIL1:")
  361.     append(the searchPath, the pathName & "PIC:UTENSILS:UTENSIL2:")
  362.     append(the searchPath, the pathName & "VID:")
  363.     append(the searchPath, the pathName & "VID:VIDEO1:")
  364.     append(the searchPath, the pathName & "VID:VIDEO2:")
  365.     append(the searchPath, the pathName & "VID:VIDEO3:")
  366.     append(the searchPath, the pathName & "VID:VIDEO4:")
  367.   end if
  368.   cursor(-1)
  369. end
  370.