home *** CD-ROM | disk | FTP | other *** search
/ Yolanda Bergman's Good Health, Great Food / GoodHealth.iso / pc / yolanda.dxr / Internal_3_STY3.ls < prev    next >
Encoding:
Text File  |  1998-03-11  |  4.5 KB  |  141 lines

  1. property pTextObj
  2. global SPRITE_FWD_BTN, SPRITE_BWD_BTN, SPRITE_GOTO_BTN, SPRITE_INFO_BTN, SPRITE_VIDEO_BTN, SPRITE_MORETEXT_BTN, SPRITE_MENU_FIRST, SPRITE_MENU_LAST, currentlistitem, lastlistitem, CAST_DUMMY_MENU, SPRITE_POPUP, SPRITE_MORETOPICS_BTN, whichmenu, SPRITE_BOX, grolloversprite, SPRITE_DSHADOW24, SPRITE_DSHADOW8, gSTY1print, SPRITE_PRINT_BTN
  3.  
  4. on new me
  5.   global CAST_MORETEXT_BTN, SPRITE_PIC, SPRITE_TEXT, SPRITE_HDR, CAST_MORETOPICS_BTN, SPRITE_VIDEO, vidList, gCastL, gSpriteNumber
  6.   set SPRITE_MENU_LAST to 24
  7.   set SPRITE_MORETOPICS_BTN to 25
  8.   set gSpriteNumber to 0
  9.   set grolloversprite to 0
  10.   set whichmenu to 1
  11.   set SPRITE_BOX to 53
  12.   set SPRITE_DSHADOW24 to 89
  13.   set SPRITE_DSHADOW8 to 88
  14.   set the visible of sprite SPRITE_DSHADOW24 to 0
  15.   set the visible of sprite SPRITE_DSHADOW8 to 0
  16.   set SPRITE_PRINT_BTN to 12
  17.   puppetstate(2, 12, 1)
  18.   puppetstate(27, 28, 1)
  19.   puppetSprite(SPRITE_POPUP, 1)
  20.   replaceSprite(SPRITE_PIC, SPRITE_PIC, 0)
  21.   replaceSprite(SPRITE_HDR, SPRITE_HDR, 0)
  22.   replaceSprite(SPRITE_MENU_FIRST, SPRITE_MENU_LAST, 0, CAST_DUMMY_MENU, whichmenu)
  23.   replaceSprite(SPRITE_BWD_BTN, SPRITE_FWD_BTN, 2)
  24.   if gSTY1print then
  25.     set the memberNum of sprite SPRITE_PRINT_BTN to 77
  26.   end if
  27.   set pTextObj to new(script "CYCLE PICS", SPRITE_TEXT, SPRITE_MORETEXT_BTN, CAST_MORETEXT_BTN)
  28.   set currentlistitem to 0
  29.   set lastlistitem to 0
  30.   set vidList to getAt(gCastL, SPRITE_VIDEO)
  31.   set the locV of sprite SPRITE_BOX to -100
  32.   if getAt(getAt(gCastL, SPRITE_MENU_FIRST), 2) <> 0 then
  33.     set the memberNum of sprite SPRITE_MORETOPICS_BTN to CAST_MORETOPICS_BTN
  34.   end if
  35.   dovideosetup(1)
  36.   set the mouseDownScript to "MouseDownRouter"
  37.   set the mouseUpScript to "MouseUpRouter"
  38.   cursor(-1)
  39.   return me
  40. end
  41.  
  42. on ExitStyle me
  43.   global gJumpToScreen
  44.   set the memberNum of sprite SPRITE_PRINT_BTN to 1002
  45.   puppetstate(2, 28, 0)
  46.   loadScreenData(gJumpToScreen)
  47. end
  48.  
  49. on StyleMouseDown me
  50.   global gSpriteNumber
  51.   set gSpriteNumber to the clickOn
  52.   set aSpriteNumber to grolloversprite
  53.   if gSpriteNumber <> aSpriteNumber then
  54.     doVideoSoundStop(1, gSpriteNumber)
  55.   end if
  56.   case gSpriteNumber of
  57.     SPRITE_BWD_BTN, SPRITE_FWD_BTN, SPRITE_MORETOPICS_BTN, SPRITE_VIDEO_BTN, SPRITE_MORETEXT_BTN:
  58.       puppetSound("mouseDwn.aif")
  59.       downbutton()
  60.     SPRITE_PRINT_BTN:
  61.       puppetSound("mouseDwn.aif")
  62.       downbutton()
  63.     SPRITE_GOTO_BTN:
  64.       puppetSound("camera.aif")
  65.       downbutton()
  66.     otherwise:
  67.       if (gSpriteNumber >= SPRITE_MENU_FIRST) and (gSpriteNumber <= SPRITE_MENU_LAST) then
  68.       end if
  69.   end case
  70. end
  71.  
  72. on StyleMouseUp me
  73.   global gSpriteNumber, gPopupObj, gSavedPopupsL
  74.   if gSpriteNumber <> the clickOn then
  75.     upbutton()
  76.     exit
  77.   end if
  78.   case gSpriteNumber of
  79.     SPRITE_GOTO_BTN:
  80.       set gPopupObj to new(script "SIMPLE POPUP")
  81.     SPRITE_FWD_BTN, SPRITE_BWD_BTN:
  82.       jumpButton()
  83.       exit
  84.     SPRITE_VIDEO_BTN:
  85.       narration(currentlistitem + 1, 1)
  86.     SPRITE_MORETOPICS_BTN:
  87.       if whichmenu = 1 then
  88.         set whichmenu to 2
  89.       else
  90.         set whichmenu to 1
  91.       end if
  92.       replaceSprite(SPRITE_MENU_FIRST, SPRITE_MENU_LAST, 0, CAST_DUMMY_MENU, whichmenu)
  93.       set the rect of sprite SPRITE_BOX to the rect of sprite SPRITE_MENU_FIRST
  94.       upbutton()
  95.       updateStage()
  96.     SPRITE_MORETEXT_BTN:
  97.       getNext(pTextObj)
  98.     SPRITE_PRINT_BTN:
  99.       if gSTY1print = 1 then
  100.         printjournal(#print)
  101.       else
  102.         if gSTY1print = 2 then
  103.           printmenu(#print)
  104.         else
  105.           if gSTY1print = 3 then
  106.             printweekly(#print)
  107.           end if
  108.         end if
  109.       end if
  110.       upbutton()
  111.     SPRITE_POPUP:
  112.       set the memberNum of sprite SPRITE_POPUP to CAST_DUMMY_MENU
  113.     otherwise:
  114.       if (gSpriteNumber >= SPRITE_MENU_FIRST) and (gSpriteNumber <= SPRITE_MENU_LAST) then
  115.         set currentlistitem to gSpriteNumber - SPRITE_MENU_FIRST + 1
  116.         if currentlistitem <> lastlistitem then
  117.           narration(currentlistitem + 1)
  118.         end if
  119.         set iCast to getAt(gActionL, gSpriteNumber)
  120.         if listp(iCast) then
  121.           set iCast to getAt(iCast, whichmenu)
  122.         end if
  123.         if integerp(iCast) then
  124.           PopUpList(iCast)
  125.         end if
  126.         set lastlistitem to currentlistitem
  127.       end if
  128.   end case
  129. end
  130.  
  131. on checkListRollover me
  132.   if grolloversprite <> the rollOver then
  133.     set rolloversprite to the rollOver
  134.     if (rolloversprite >= SPRITE_MENU_FIRST) and (rolloversprite <= SPRITE_MENU_LAST) then
  135.       set grolloversprite to rolloversprite
  136.       set the rect of sprite SPRITE_BOX to the rect of sprite grolloversprite
  137.       updateStage()
  138.     end if
  139.   end if
  140. end
  141.