home *** CD-ROM | disk | FTP | other *** search
/ Better Homes & Gardens: …oking for Today - Chicken / Image.iso / pc / shared.dxr / 01001_navigation.ls next >
Encoding:
Text File  |  1995-11-21  |  4.5 KB  |  204 lines

  1. on goBack
  2.   global gCurrentMovie
  3.   helpOff()
  4.   set aMovie to "to" & char 1 to offset(".", gCurrentMovie) - 1 of gCurrentMovie
  5.   do(aMovie)
  6. end
  7.  
  8. on goMain
  9.   global gFromRecipeP, gCFTBook, gCFTBundle, gCurrentMainFrame
  10.   helpOff()
  11.   setBack()
  12.   set gFromRecipeP to 0
  13.   go("first" & gCFTBook, the pathName & "Main")
  14.   soundsOn()
  15. end
  16.  
  17. on setBack
  18.   global gCurrentMovie, gCurrentMainFrame, gCurrentRecipeFrame, gFromRecipeP, gCFTBook, gCFTBundle
  19.   helpOff()
  20.   puppetSound(0)
  21.   updateStage()
  22.   set gCurrentMovie to the movie
  23.   if char 1 to 4 of the movie = "main" then
  24.     set gCurrentMainFrame to the frameLabel
  25.     set gCurrentRecipeFrame to "recipe1"
  26.     set gFromRecipeP to 0
  27.   else
  28.     if char 1 to 7 of the movie = "recipes" then
  29.       set gCurrentRecipeFrame to the frameLabel
  30.       set gFromRecipeP to 1
  31.     else
  32.       if char 1 to 4 of the movie = "tips" then
  33.         set gFromRecipeP to 1
  34.       else
  35.         set gCurrentMainFrame to "main" & gCFTBook
  36.         set gFromRecipeP to 0
  37.       end if
  38.     end if
  39.   end if
  40. end
  41.  
  42. on ToMain
  43.   global gCurrentMainFrame, gCFTBook
  44.   helpOff()
  45.   setBack()
  46.   if gCurrentMainFrame = "PastaIndex" then
  47.     set buffer to "bufferPasta"
  48.   else
  49.     if gCurrentMainFrame = "VegiIndex" then
  50.       set buffer to "bufferVegi"
  51.     else
  52.       if gCurrentMainFrame = "StirIndex" then
  53.         set buffer to "bufferStir"
  54.       else
  55.         if gCurrentMainFrame = "ChickIndex" then
  56.           set buffer to "bufferChick"
  57.         else
  58.           if gCurrentMainFrame = "PastaIndexSolo" then
  59.             set buffer to "bufferPastaSolo"
  60.           else
  61.             if gCurrentMainFrame = "VegiIndexSolo" then
  62.               set buffer to "bufferVegiSolo"
  63.             else
  64.               if gCurrentMainFrame = "StirIndexSolo" then
  65.                 set buffer to "bufferStirSolo"
  66.               else
  67.                 if gCurrentMainFrame = "ChickIndexSolo" then
  68.                   set buffer to "bufferChickSolo"
  69.                 else
  70.                   if gCurrentMainFrame = "AZIndex" then
  71.                     set buffer to "bufferAZ"
  72.                   else
  73.                     set buffer to "first" & gCFTBook
  74.                   end if
  75.                 end if
  76.               end if
  77.             end if
  78.           end if
  79.         end if
  80.       end if
  81.     end if
  82.   end if
  83.   go(buffer, the pathName & "Main")
  84.   soundsOn()
  85. end
  86.  
  87. on toRecipes
  88.   global gCurrentBook, gCurrentRecipeFrame, gCFTBook
  89.   helpOff()
  90.   setBack()
  91.   if gCurrentBook = "Pasta" then
  92.     if gCurrentRecipeFrame = "recipe2" then
  93.       set buffer to "bufferA2"
  94.     else
  95.       set buffer to "bufferA1"
  96.     end if
  97.   else
  98.     if gCurrentBook = "Vegi" then
  99.       if gCurrentRecipeFrame = "recipe2" then
  100.         set buffer to "bufferA2"
  101.       else
  102.         set buffer to "bufferA1"
  103.       end if
  104.     else
  105.       if gCurrentBook = "Stir" then
  106.         if gCurrentRecipeFrame = "recipe2" then
  107.           set buffer to "bufferA2"
  108.         else
  109.           set buffer to "bufferA1"
  110.         end if
  111.       else
  112.         if gCurrentBook = "Chick" then
  113.           if gCurrentRecipeFrame = "recipe2" then
  114.             set buffer to "bufferA2"
  115.           else
  116.             set buffer to "bufferA1"
  117.           end if
  118.         else
  119.           if gCurrentBook = "Bundle" then
  120.             if gCurrentRecipeFrame = "recipe2" then
  121.               set buffer to "bufferA2"
  122.             else
  123.               set buffer to "bufferA1"
  124.             end if
  125.           else
  126.             if gCurrentBook = "Personal" then
  127.               set buffer to "bufferP"
  128.             end if
  129.           end if
  130.         end if
  131.       end if
  132.     end if
  133.   end if
  134.   go(buffer, the pathName & "Recipes")
  135.   soundsOn()
  136. end
  137.  
  138. on toVideo
  139.   setBack()
  140.   go(1, the pathName & "Video")
  141.   soundsOn()
  142. end
  143.  
  144. on toTips
  145.   setBack()
  146.   go(1, the pathName & "Tips")
  147.   soundsOn()
  148. end
  149.  
  150. on toUtility
  151.   setBack()
  152.   go(1, the pathName & "Utility")
  153.   soundsOn()
  154. end
  155.  
  156. on toChooser
  157.   setBack()
  158.   go(1, the pathName & "Chooser")
  159.   soundsOn()
  160. end
  161.  
  162. on ToPersonal
  163.   global gCurrentBook, gCurrentRecipe, gDefaultRecipe
  164.   if gCurrentRecipe < 6000 then
  165.     set gDefaultRecipe to gCurrentRecipe
  166.   end if
  167.   setBack()
  168.   go(1, the pathName & "Personal")
  169.   soundsOn()
  170. end
  171.  
  172. on toPlanner
  173.   setBack()
  174.   go(1, the pathName & "Planner")
  175.   soundsOn()
  176. end
  177.  
  178. on toShopping
  179.   setBack()
  180.   go(1, the pathName & "Shopping")
  181.   soundsOn()
  182. end
  183.  
  184. on soundsOn
  185.   set the mouseDownScript to "downClick"
  186.   set the mouseUpScript to "upClick"
  187. end
  188.  
  189. on downclick
  190.   if not soundBusy(1) then
  191.     puppetSound("downClick")
  192.   end if
  193.   updateStage()
  194.   pass()
  195. end
  196.  
  197. on upclick
  198.   if not soundBusy(1) then
  199.     puppetSound("upClick")
  200.   end if
  201.   updateStage()
  202.   pass()
  203. end
  204.