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

  1. on exitFrame
  2.   global gGoingToTopic
  3.   if gGoingToTopic <> 1 then
  4.     go(the frame)
  5.   else
  6.     set gGoingToTopic to 0
  7.   end if
  8. end
  9.  
  10. on enterFrame
  11.   global gGoingToTopic
  12.   puppetSound(0)
  13.   setCursors()
  14.   puppetSprite(2, 1)
  15.   setPuppets(1)
  16.   set gGoingToTopic to 0
  17.   checkHilite()
  18. end
  19.  
  20. on checkHilite
  21.   global gTopicList, gButtonLast, gButtonBase
  22.   set vCast to the mouseCast
  23.   if vCast = -1 then
  24.     set vText to field "currentTitle"
  25.     if vText <> EMPTY then
  26.       put EMPTY into field "currentTitle"
  27.     end if
  28.     exit
  29.   end if
  30.   if (vCast > gButtonBase) and (vCast < gButtonLast) then
  31.     set vLine to vCast - gButtonBase
  32.     set vTitle to line vLine of field "titles"
  33.     set vTextNow to field "currentTitle"
  34.     if vTextNow <> vTitle then
  35.       put vTitle into field "currentTitle"
  36.     end if
  37.   else
  38.     set vText to field "currentTitle"
  39.     if vText <> EMPTY then
  40.       put EMPTY into field "currentTitle"
  41.     end if
  42.   end if
  43.   updateStage()
  44. end
  45.  
  46. on mouseDown
  47.   global gButtonBase, gTitleList, gSpriteBase, gGoingToTopic
  48.   set vCastNo to the mouseCast
  49.   set vName to the name of cast vCastNo
  50.   if (vName = "quitUp") or (vName = "currentTitle") or (vName = "MLOGO") or (vName = "mainBg") then
  51.     exit
  52.   end if
  53.   set vDisp to vCastNo - gButtonBase
  54.   set vSpriteNo to vDisp + gSpriteBase
  55.   set the castNum of sprite vSpriteNo to gButtonBase
  56.   updateStage()
  57.   set vOld to 0
  58.   repeat while the mouseDown
  59.     set vMcast to the mouseCast
  60.     if vMcast = gButtonBase then
  61.       nothing()
  62.     else
  63.       if vMcast = vCastNo then
  64.         set the castNum of sprite vSpriteNo to gButtonBase
  65.         updateStage()
  66.       else
  67.         set the castNum of sprite vSpriteNo to vCastNo
  68.         updateStage()
  69.       end if
  70.     end if
  71.     set vOld to vMcast
  72.   end repeat
  73.   set the castNum of sprite vSpriteNo to vCastNo
  74.   updateStage()
  75.   set vReleaseObj to the mouseCast
  76.   if vReleaseObj = vCastNo then
  77.     setDemo(vName, vDisp)
  78.     set gGoingToTopic to 1
  79.     set vGoto to vName & "main"
  80.     setPuppets(0)
  81.     go(vGoto)
  82.   end if
  83. end
  84.  
  85. on setDemo fTopic, fOffset
  86.   global gCurrentTopic, gTopicOffset, gTopicState
  87.   set gTopicState to "main"
  88.   set gCurrentTopic to fTopic
  89.   set gTopicOffset to fOffset
  90. end
  91.  
  92. on setCursors
  93.   global gHandCursor
  94.   repeat with i = 11 to 23
  95.     set the cursor of sprite i to gHandCursor
  96.   end repeat
  97.   set the cursor of sprite 3 to gHandCursor
  98. end
  99.