home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gOldPage1, gOldPage2, gOldPage4, gNotesAllSpr, gNotesCurrentSpr, gShowCurrentNote, gBeautySprite, gMaskSprite, gBlurbSprite, gInstructionSprite, gIngredientSprite, gTitleSprite, gChapterSprite, gPageNumSprite, gServingsSprite, gPrepTimeSprite, gTipSprite1, gTipSprite2, gTipTextSprite, gZoomSprite, gZoomBox, gNutritionSprite, gLinked, gHyperTerm, gHelpSprite, gCurrentBook, gCurrentRecipe, gCurrentRecipeFrame, gRecipeIDDB, gPersonalIDDB, gCFTBook, gBrowserMin, gBrowserMax, gCurrentBrowser, gBrowserNum, gBrowseChooser, gPersonalBrowser, gRecipesFoundBrowser, gPastaBrowser, gVegiBrowser, gStirBrowser, gChickBrowser, gWantGeneralInfo
- set gFirstRecipeRun to 0
- set the textHeight of field "servings" to 16
- set the textSize of field "servings" to 12
- set the textStyle of field "servings" to "plain"
- set the textHeight of field "prep time" to 16
- set the textSize of field "prep time" to 12
- set the textStyle of field "prep time" to "plain"
- set the textHeight of field "instructions" to 14
- set the textSize of field "instructions" to 12
- set the textStyle of field "instructions" to "plain"
- set the textHeight of field "ingredients" to 14
- set the textSize of field "ingredients" to 12
- set the textStyle of field "ingredients" to "bold"
- set the textHeight of field "blurb" to 14
- set the textSize of field "blurb" to 12
- set the textStyle of field "blurb" to "bold"
- set the backColor of cast 121 to 243
- set the textHeight of field "notes scroll" to 14
- set the textStyle of field "notes scroll" to "plain"
- set the textSize of field "notes scroll" to 12
- if the machineType = 256 then
- set the textFont of field "servings" to "arial"
- set the textFont of field "prep time" to "arial"
- set the textFont of field "instructions" to "arial"
- set the textFont of field "ingredients" to "arial"
- set the textFont of field "blurb" to "arial"
- set the textFont of field "notes scroll" to "arial"
- else
- set the textFont of field "servings" to "helvetica"
- set the textFont of field "prep time" to "helvetica"
- set the textFont of field "instructions" to "helvetica"
- set the textFont of field "ingredients" to "helvetica"
- set the textFont of field "blurb" to "helvetica"
- set the textFont of field "notes scroll" to "helvetica"
- end if
- set gNotesCurrentSpr to 4
- set gNotesAllSpr to 5
- set gShowCurrentNote to 1
- set gBeautySprite to 16
- set gBlurbSprite to 45
- set gMaskSprite to 24
- set gInstructionSprite to 2
- set gIngredientSprite to 3
- set gTitleSprite to 44
- set gChapterSprite to 30
- set gPageNumSprite to 31
- set gServingsSprite to 32
- set gPrepTimeSprite to 33
- set gTipTextSprite to 2
- set gZoomSprite to 47
- set gZoomBox to 48
- set gNutritionSprite to 27
- set gLinked to 0
- set gHyperTerm to 0
- set gHelpSprite to 46
- helpOff()
- if gCurrentBook = "personal" then
- put "Personal Recipes" into field "book"
- if gBrowseChooser = 1 then
- set gBrowserMin to 1
- set gBrowserMax to count(gRecipesFoundBrowser)
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gRecipesFoundBrowser, recipeName)
- set gCurrentBrowser to gRecipesFoundBrowser
- set gBrowseChooser to 0
- else
- set gBrowserMin to 1
- set gBrowserMax to count(gPersonalBrowser)
- put gCurrentRecipe
- set recipeName to getOne(gPersonalIDDB, gCurrentRecipe)
- put recipeName
- if recipeName = 0 then
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- end if
- set gCurrentRecipe to getProp(gPersonalIDDB, recipeName)
- set gBrowserNum to getProp(gPersonalBrowser, recipeName)
- set gCurrentBrowser to gPersonalBrowser
- end if
- recipe4()
- else
- if gCurrentBook = "Pasta" then
- put "Cooking for Today - Pasta" into field "book"
- if gBrowseChooser = 1 then
- set gBrowserMin to 1
- set gBrowserMax to count(gRecipesFoundBrowser)
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gRecipesFoundBrowser, recipeName)
- set gCurrentBrowser to gRecipesFoundBrowser
- set gBrowseChooser to 0
- else
- set gBrowserMin to 1
- set gBrowserMax to 71
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gPastaBrowser, recipeName)
- set gCurrentBrowser to gPastaBrowser
- end if
- do(gCurrentRecipeFrame)
- else
- if gCurrentBook = "Vegi" then
- put "Cooking for Today - Vegetarian" into field "book"
- if gBrowseChooser = 1 then
- set gBrowserMin to 1
- set gBrowserMax to count(gRecipesFoundBrowser)
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gRecipesFoundBrowser, recipeName)
- set gCurrentBrowser to gRecipesFoundBrowser
- set gBrowseChooser to 0
- else
- set gBrowserMin to 1
- set gBrowserMax to 68
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gVegiBrowser, recipeName)
- set gCurrentBrowser to gVegiBrowser
- end if
- do(gCurrentRecipeFrame)
- else
- if gCurrentBook = "Stir" then
- put "Cooking for Today - Stir Fries" into field "book"
- if gBrowseChooser = 1 then
- set gBrowserMin to 1
- set gBrowserMax to count(gRecipesFoundBrowser)
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gRecipesFoundBrowser, recipeName)
- set gCurrentBrowser to gRecipesFoundBrowser
- set gBrowseChooser to 0
- else
- set gBrowserMin to 1
- set gBrowserMax to 68
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gStirBrowser, recipeName)
- set gCurrentBrowser to gStirBrowser
- end if
- do(gCurrentRecipeFrame)
- else
- if gCurrentBook = "Chick" then
- put "Cooking for Today - Chicken" into field "book"
- if gBrowseChooser = 1 then
- set gBrowserMin to 1
- set gBrowserMax to count(gRecipesFoundBrowser)
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gRecipesFoundBrowser, recipeName)
- set gCurrentBrowser to gRecipesFoundBrowser
- set gBrowseChooser to 0
- else
- set gBrowserMin to 1
- set gBrowserMax to 68
- set recipeName to getOne(gRecipeIDDB, gCurrentRecipe)
- set gBrowserNum to getProp(gChickBrowser, recipeName)
- set gCurrentBrowser to gChickBrowser
- end if
- do(gCurrentRecipeFrame)
- end if
- end if
- end if
- end if
- end if
- end
-
- on stopMovie
- unLoadCast()
- helpOff()
- cleanLegos()
- end
-
- on recipe
- global gCurrentBook, gCFTBook
- if gCurrentBook = "personal" then
- recipe4()
- else
- if gCurrentBook = gCFTBook then
- recipe2()
- else
- if gCFTBook = "Bundle" then
- recipe2()
- end if
- end if
- end if
- end
-
- on recipe1
- helpOff()
- beautyOff()
- blurbOff()
- titleOff()
- cleanLegos()
- go("recipe1")
- makeButtons1()
- updateDB()
- end
-
- on recipe2
- helpOff()
- zoomOff()
- titleOff()
- textOff()
- nutritionOff()
- cleanLegos()
- go("recipe2")
- makeScroll2()
- makeButtons2()
- updateDB()
- end
-
- on recipe4
- titleOff()
- textOff()
- cleanLegos()
- go("recipe4")
- makeScroll2()
- makeButtons2()
- updateDB()
- end
-
- on browseRight
- global gCurrentBook, gCurrentRecipe, gRecipeIDDB, gPersonalIDDB, gBrowserNum, gBrowserMin, gBrowserMax, gCurrentBrowser, gBrowseChooser
- if gBrowserNum < gBrowserMax then
- set gBrowserNum to gBrowserNum + 1
- else
- set gBrowserNum to gBrowserMin
- end if
- set recipeName to getOne(gCurrentBrowser, gBrowserNum)
- if gCurrentBook = "personal" then
- set gCurrentRecipe to getProp(gPersonalIDDB, recipeName)
- else
- set gCurrentRecipe to getProp(gRecipeIDDB, recipeName)
- end if
- pageInvisible()
- updateDB()
- end
-
- on browseLeft
- global gCurrentBook, gCurrentRecipe, gRecipeIDDB, gPersonalIDDB, gBrowserNum, gBrowserMin, gBrowserMax, gCurrentBrowser
- if gBrowserNum > gBrowserMin then
- set gBrowserNum to gBrowserNum - 1
- else
- set gBrowserNum to gBrowserMax
- end if
- set recipeName to getOne(gCurrentBrowser, gBrowserNum)
- if gCurrentBook = "personal" then
- set gCurrentRecipe to getProp(gPersonalIDDB, recipeName)
- else
- set gCurrentRecipe to getProp(gRecipeIDDB, recipeName)
- end if
- pageInvisible()
- updateDB()
- end
-
- on pageInvisible
- if the frame = label("recipe1") then
- beautyOff()
- blurbOff()
- titleOff()
- else
- if the frame = label("recipe2") then
- titleOff()
- textOff()
- else
- if the frame = label("recipe4") then
- titleOff()
- textOff()
- end if
- end if
- end if
- end
-
- on updateDB
- global gHypertextButton, gCurrentRecipe, gOldPage1, gOldPage2, gOldPage3, gOldPage4, gOldPage5, gScroll1, gScroll2, gScroll3
- unSelect(gHypertextButton)
- unHyperLink()
- if the frame = label("recipe1") then
- DBrecipePage1()
- beautyOn()
- blurbOn()
- titleOn()
- set gOldPage1 to gCurrentRecipe
- else
- if the frame = label("recipe2") then
- controlPosition(gScroll1, 0.0)
- controlPosition(gScroll2, 0.0)
- DBRecipePage2()
- titleOn()
- textOn()
- nutritionOn()
- set gOldPage2 to gCurrentRecipe
- else
- if the frame = label("recipe4") then
- controlPosition(gScroll1, 0.0)
- controlPosition(gScroll2, 0.0)
- DBRecipePage4()
- titleOn()
- textOn()
- set gOldPage4 to gCurrentRecipe
- end if
- end if
- end if
- end
-
- on setCurrentBook
- global gCurrentRecipe, gCurrentBook
- if (gCurrentRecipe > 1700) and (gCurrentRecipe < 1773) then
- set gCurrentBook to "Pasta"
- else
- if (gCurrentRecipe > 1800) and (gCurrentRecipe < 1869) then
- set gCurrentBook to "Vegi"
- else
- if (gCurrentRecipe > 1900) and (gCurrentRecipe < 1969) then
- set gCurrentBook to "Stir"
- else
- if (gCurrentRecipe > 2000) and (gCurrentRecipe < 2069) then
- set gCurrentBook to "Chick"
- end if
- end if
- end if
- end if
- end
-
- on updateBeauty fileName
- global gCurrentBook, gBeautySprite, gBlurbSprite
- setCurrentBook()
- if gCurrentBook = "Pasta" then
- set aFolder to "PASTA"
- updateStage()
- loadPIC("BEAUTY", aFolder, fileName, "beauty")
- else
- if gCurrentBook = "Vegi" then
- set aFolder to "VEGI"
- updateStage()
- loadPIC("BEAUTY", aFolder, fileName, "beauty")
- else
- if gCurrentBook = "Stir" then
- set aFolder to "STIR"
- updateStage()
- loadPIC("BEAUTY", aFolder, fileName, "beauty")
- else
- if gCurrentBook = "Chick" then
- set aFolder to "CHICK"
- updateStage()
- loadPIC("BEAUTY", aFolder, fileName, "beauty")
- end if
- end if
- end if
- end if
- set the visible of sprite gBlurbSprite to 1
- set the visible of sprite gBeautySprite to 1
- end
-
- on updateMethod1
- end
-
- on updateMethod2
- end
-
- on updateTip1
- end
-
- on updateTip2
- end
-
- on makeScroll2
- global gCurrentBook, gScroll1, gScroll2, gInstructionSprite, gIngredientSprite, gMethodSprite1, gMethodSprite2
- set track to new("Button", [#spriteChan: 16])
- set ball to new("Button", [#spriteChan: 17, #pressedCast: 56])
- set up to new("Button", [#spriteChan: 18, #pressedCast: 58])
- set down to new("Button", [#spriteChan: 19, #pressedCast: 60])
- set gScroll1 to new("ScrollBar", [#scrollSprite: gIngredientSprite, #minButton: up, #maxButton: down, #thumbButton: ball, #trackButton: track])
- set links to [gMethodSprite1, gMethodSprite2]
- set track to new("Button", [#spriteChan: 20])
- set ball to new("Button", [#spriteChan: 21, #pressedCast: 56])
- set up to new("Button", [#spriteChan: 22, #pressedCast: 58])
- set down to new("Button", [#spriteChan: 23, #pressedCast: 60])
- set gScroll2 to new("ScrollBar", [#scrollSprite: gInstructionSprite, #scrollLinks: links, #minButton: up, #maxButton: down, #thumbButton: ball, #trackButton: track])
- end
-
- on makeScroll3
- global gScroll3, gTipSprite1, gTipSprite2, gTipTextSprite
- set links to [gTipSprite1, gTipSprite2]
- set track to new("Button", [#spriteChan: 16])
- set ball to new("Button", [#spriteChan: 17, #pressedCast: 56])
- set up to new("Button", [#spriteChan: 18, #pressedCast: 58])
- set down to new("Button", [#spriteChan: 19, #pressedCast: 60])
- set gScroll3 to new("ScrollBar", [#scrollSprite: gTipTextSprite, #scrollLinks: links, #minButton: up, #maxButton: down, #thumbButton: ball, #trackButton: track])
- end
-
- on zoomRoll2
- end
-
- on zoomRoll3
- end
-
- on zoomMethod1
- end
-
- on zoomMethod2
- end
-
- on zoomTip1
- end
-
- on zoomTip2
- end
-
- on zoomOn
- end
-
- on zoomToggle
- end
-
- on zoomOff
- end
-
- on titleOn
- global gTitleSprite, gChapterSprite
- set the visible of sprite gTitleSprite to 1
- set the visible of sprite gChapterSprite to 1
- end
-
- on titleOff
- global gTitleSprite, gChapterSprite
- set the visible of sprite gTitleSprite to 0
- set the visible of sprite gChapterSprite to 0
- end
-
- on beautyOn
- global gBeautySprite
- set the visible of sprite gBeautySprite to 1
- end
-
- on beautyOff
- global gBeautySprite
- set the visible of sprite gBeautySprite to 0
- end
-
- on blurbOn
- global gBlurbSprite
- set the visible of sprite gBlurbSprite to 1
- end
-
- on blurbOff
- global gBlurbSprite
- set the visible of sprite gBlurbSprite to 0
- end
-
- on setMethods
- end
-
- on methodsOn
- end
-
- on methodsOff
- end
-
- on setTips
- end
-
- on tipOn
- end
-
- on tipOff
- end
-
- on textOn
- global gInstructionSprite, gIngredientSprite, gServingsSprite, gPrepTimeSprite
- set the visible of sprite gInstructionSprite to 1
- set the visible of sprite gIngredientSprite to 1
- set the visible of sprite gServingsSprite to 1
- set the visible of sprite gPrepTimeSprite to 1
- set the visible of sprite 26 to 1
- end
-
- on textOff
- global gInstructionSprite, gIngredientSprite, gServingsSprite, gPrepTimeSprite
- set the visible of sprite gInstructionSprite to 0
- set the visible of sprite gIngredientSprite to 0
- set the visible of sprite gServingsSprite to 0
- set the visible of sprite gPrepTimeSprite to 0
- set the visible of sprite 26 to 0
- end
-
- on nutritionOn
- global gCurrentBook, gNutritionSprite
- set the visible of sprite gNutritionSprite to 1
- end
-
- on nutritionOff
- global gNutritionSprite
- set the visible of sprite gNutritionSprite to 0
- end
-
- on notes
- global gCurrentRecipe, gDBResult
- cleanLegos()
- DBBeginSaveSession()
- DBGetSetRecord(gCurrentRecipe, 0)
- if gDBResult = 0 then
- set note to DBGetSetField(20000)
- end if
- put note into field "notes"
- put note into field "save notes"
- put note into field "notes scroll"
- go("notes")
- makeNotesScroll()
- makeNotesButtons()
- DBEndSession()
- end
-
- on getnotes
- global gCurrentRecipe, gDBResult, gCurrentNote
- set gCurrentNote to EMPTY
- DBBeginSaveSession()
- DBGetSetRecord(gCurrentRecipe, 0)
- if gDBResult = 0 then
- set gCurrentNote to DBGetSetField(20000)
- end if
- DBEndSession()
- end
-
- on currentnote
- global gCurrentRecipe, gDBResult
- DBBeginSaveSession()
- DBGetSetRecord(gCurrentRecipe, 0)
- if gDBResult = 0 then
- set note to DBGetSetField(20000)
- end if
- put note into field "notes"
- put note into field "save notes"
- put note into field "notes scroll"
- controlPosition(gNotesScroll, 0.0)
- DBEndSession()
- end
-
- on showAllNotes
- global gCurrentRecipe, gDBResult, gShowCurrentNote, gRecipeIDDB, gPersonalIDDB, gRecipesAvailableList
- DBBeginSaveSession()
- put EMPTY into field "allnotes"
- cursor(4)
- put field "notes" into field "save notes"
- repeat with i in gRecipesAvailableList
- DBGetSetRecord(i, 0)
- if gDBResult = 0 then
- set note to DBGetSetField(20000)
- put getOne(gRecipeIDDB, i) after field "allnotes"
- put ":" after field "allnotes"
- put RETURN after field "allnotes"
- put RETURN after field "allnotes"
- put note after field "allnotes"
- put RETURN after field "allnotes"
- put RETURN after field "allnotes"
- put RETURN after field "allnotes"
- next repeat
- end if
- nothing()
- end repeat
- repeat with i in gPersonalIDDB
- DBGetSetRecord(i, 0)
- if gDBResult = 0 then
- set note to DBGetSetField(20000)
- put getOne(gPersonalIDDB, i) after field "allnotes"
- put ":" after field "allnotes"
- put RETURN after field "allnotes"
- put RETURN after field "allnotes"
- put note after field "allnotes"
- put RETURN after field "allnotes"
- put RETURN after field "allnotes"
- put RETURN after field "allnotes"
- next repeat
- end if
- nothing()
- end repeat
- cursor(-1)
- if field "allnotes" <> EMPTY then
- put field "allnotes" into field "notes scroll"
- put field "allnotes" into field "notes"
- else
- nothing()
- end if
- controlPosition(gNotesScroll, 0.0)
- DBEndSession()
- end
-
- on makeNotesButtons
- global gNotesAllSpr, gNotesCurrentSpr, gShowCurrentNote
- puppetSprite(gNotesCurrentSpr, 1)
- puppetSprite(gNotesAllSpr, 1)
- if gShowCurrentNote then
- set the castNum of sprite gNotesCurrentSpr to 117
- set the castNum of sprite gNotesAllSpr to 114
- else
- set the castNum of sprite gNotesCurrentSpr to 116
- set the castNum of sprite gNotesAllSpr to 115
- end if
- updateStage()
- end
-
- on radioButton spriteNum
- puppetSprite(spriteNum, 1)
- set buttonList to []
- set myCast to the castNum of sprite spriteNum
- set pressedCast to myCast + 1
- add(buttonList, spriteNum)
- add(buttonList, myCast)
- add(buttonList, pressedCast)
- return buttonList
- end
-
- on radioDown buttonList
- set mySprite to getAt(buttonList, 1)
- set myCast to getAt(buttonList, 2)
- set pressedCast to getAt(buttonList, 3)
- set the castNum of sprite mySprite to pressedCast
- repeat while the mouseDown
- if rollOver(mySprite) then
- set the castNum of sprite mySprite to pressedCast
- else
- set the castNum of sprite mySprite to myCast
- end if
- updateStage()
- end repeat
- end
-
- on radioUp buttonList
- global gLastRadioButton
- set mySprite to getAt(buttonList, 1)
- set myCast to getAt(buttonList, 2)
- set pressedCast to getAt(buttonList, 3)
- if the castNum of sprite mySprite = pressedCast then
- if objectp(gLastRadioButton) then
- unSelect(gLastRadioButton)
- end if
- set gLastRadioButton to buttonList
- return 1
- else
- return 0
- end if
- end
-
- on radioSelect buttonList
- global gLastRadioButton
- set gLastRadioButton to EMPTY
- radioDown(buttonList)
- radioUp(buttonList)
- end
-
- on radioUnselect buttonList
- set mySprite to getAt(buttonList, 1)
- set myCast to getAt(buttonList, 2)
- set the castNum of sprite mySprite to myCast
- end
-
- on saveNotes
- global gCurrentRecipe
- put field "save notes"
- put field "notes"
- DBBeginSaveSession()
- set note to removeCarrots(field "save notes")
- put note
- if removeSpace(note) <> EMPTY then
- set note to gCurrentRecipe & "^" & note
- put note
- DBSetRecord(0, note)
- else
- DBDeleteRecord(0, gCurrentRecipe)
- end if
- put " " into field "notes"
- put " " into field "save notes"
- put " " into field "notes scroll"
- DBEndSession()
- end
-
- on makeNotesScroll
- global gNotesScroll, gNotesDoneButton
- set track to new("Button", [#spriteChan: 7])
- set ball to new("Button", [#spriteChan: 8, #pressedCast: 126])
- set up to new("Button", [#spriteChan: 9, #pressedCast: 128])
- set down to new("Button", [#spriteChan: 10, #pressedCast: 130])
- set gNotesScroll to new("ScrollBar", [#scrollField: "notes", #scrollFieldOut: 6, #minButton: up, #maxButton: down, #thumbButton: ball, #trackButton: track])
- set gNotesDoneButton to birth(script "CFTButton", 11)
- end
-
- on send
- global gShoppingButton, gPersonalButton, gPlannerButton, gOKButton, gCancelButton, gSendShopping, gSendPersonal, gSendPlanner
- cleanLegos()
- go("send")
- set gOKButton to birth(script "checkButton", 7)
- set gCancelButton to birth(script "checkButton", 8)
- set gShoppingButton to birth(script "checkButton", 9)
- set gPersonalButton to birth(script "checkButton", 10)
- set gPlannerButton to birth(script "checkButton", 11)
- if gSendShopping then
- select(gShoppingButton)
- end if
- if gSendPersonal then
- select(gPersonalButton)
- end if
- if gSendPlanner then
- select(gPlannerButton)
- end if
- end
-
- on sendIt
- global gCurrentRecipe, gSendShopping, gSendPersonal, gSendPlanner, gShoppingTitles, gShoppingIngredients, gShoppingServings, gPersonalRecipes, gPlannerRecipes
- cursor(4)
- set flap to 0
- if gSendShopping and not getPos(gShoppingTitles, field "title") then
- add(gShoppingTitles, field "title")
- add(gShoppingIngredients, DBShopping(gCurrentRecipe))
- add(gShoppingServings, field "servings")
- set flap to 1
- end if
- if gSendPersonal and not getPos(gPersonalRecipes, field "title") then
- add(gPersonalRecipes, field "title")
- set flap to 1
- end if
- if gSendPlanner and not getPos(gPlannerRecipes, field "title") then
- add(gPlannerRecipes, field "title")
- set flap to 1
- end if
- if flap then
- updateStage()
- end if
- cursor(-1)
- recipe()
- end
-
- on hyperLink
- global gLinked, gRecipeTerms
- if gLinked then
- unHyperLink()
- else
- if not gLinked then
- set gLinked to 1
- set gRecipeTerms to DBRecipeTerms()
- cursor(4)
- repeat with i in gRecipeTerms
- set startPlace to offset(i, field "instructions")
- set endPlace to startPlace + length(i) - 1
- if startPlace <> 0 then
- set the textStyle of char startPlace to endPlace of field "instructions" to "underline"
- end if
- end repeat
- cursor(-1)
- end if
- end if
- end
-
- on unHyperLink
- global gLinked, gHyperTerm
- set gLinked to 0
- set gHyperTerm to 0
- set the textStyle of field "instructions" to "plain"
- end
-
- on useHyperLink
- global gHyperTerm
- set aWord to the mouseWord
- if the textStyle of word aWord of field "instructions" = "underline" then
- set termBegin to offset(word aWord of field "instructions", field "instructions")
- set termEnd to termBegin
- repeat while 1
- set termBegin to termBegin - 1
- if the textStyle of char termBegin of field "instructions" <> "underline" then
- set termBegin to termBegin + 1
- exit repeat
- end if
- end repeat
- repeat while 1
- set termEnd to termEnd + 1
- if the textStyle of char termEnd of field "instructions" <> "underline" then
- set gHyperTerm to char termBegin to termEnd - 1 of field "instructions"
- exit repeat
- end if
- end repeat
- toUtility()
- end if
- end
-
- on makeButtons1
- global gPhotoButton, gRecipeButton
- set gPhotoButton to birth(script "CFTButton", 24)
- set gRecipeButton to birth(script "CFTButton", 28)
- allPageButtons()
- end
-
- on makeButtons2
- global gHypertextButton, gSendButton, gNotesButton, gPrintButton, gPhotoButton, gRecipeButton
- set gHypertextButton to birth(script "checkButton", 34)
- set gSendButton to birth(script "CFTButton", 35)
- set gNotesButton to birth(script "CFTButton", 36)
- set gPrintButton to birth(script "CFTButton", 37)
- set gPhotoButton to birth(script "CFTButton", 24)
- set gRecipeButton to birth(script "CFTButton", 28)
- allPageButtons()
- end
-
- on makeButtons3
- global gPhotoButton, gRecipeButton
- set gPhotoButton to birth(script "CFTButton", 24)
- set gRecipeButton to birth(script "CFTButton", 28)
- allPageButtons()
- end
-
- on allPageButtons
- global gMainButton, gHelpButton, gBackButton, gChooserButton, gPlannerButton, gShoppingButton, gPersonalButton, gUtilityButton, gVideoButton, gCurrentBook, gBrowseLeftButton, gBrowseRightButton, gPhotoButton, gRecipeButton
- set gMainButton to birth(script "CFTButton", 7)
- set gHelpButton to birth(script "CFTButton", 15)
- set gBackButton to birth(script "CFTButton", 8)
- set gChooserButton to birth(script "CFTButton", 9)
- set gPlannerButton to birth(script "CFTButton", 10)
- set gShoppingButton to birth(script "CFTButton", 11)
- set gPersonalButton to birth(script "CFTButton", 12)
- set gUtilityButton to birth(script "CFTButton", 13)
- set gVideoButton to birth(script "CFTButton", 14)
- set gBrowseLeftButton to birth(script "CFTButton", 25)
- set gBrowseRightButton to birth(script "CFTButton", 26)
- end
-
- on helpOn
- global gLastHelp, gHelpLinks, gHelpActive, gHelpSprite, gCurrentBook
- if gHelpActive then
- helpOff()
- else
- set gHelpActive to 1
- set gLastHelp to 0
- set gHelpLinks to [7: 19, 8: 23, 9: 12, 10: 13, 11: 14, 12: 5, 13: 16, 14: 17, 15: 1, 25: 21, 26: 21, 29: 21, 30: 21]
- if the frame = label("recipe1") then
- addProp(gHelpLinks, 18, 22)
- else
- if the frame = label("recipe2") then
- addProp(gHelpLinks, 32, 101)
- addProp(gHelpLinks, 33, 102)
- addProp(gHelpLinks, 34, 103)
- addProp(gHelpLinks, 35, 25)
- addProp(gHelpLinks, 36, 29)
- addProp(gHelpLinks, 37, 26)
- else
- if the frame = label("recipe4") then
- addProp(gHelpLinks, 36, 29)
- addProp(gHelpLinks, 37, 26)
- end if
- end if
- end if
- puppetSprite(gHelpSprite, 1)
- end if
- end
-