home *** CD-ROM | disk | FTP | other *** search
/ Club KidSoft Volume 3 #3 / CKSPCV33.BIN / movies / catalog.dir / 00047_Script_47 < prev    next >
Text File  |  1995-07-19  |  2KB  |  58 lines

  1. -- "CatalogInit" + 1
  2. on exitFrame
  3.   -- Make boxes (which are currently hidden) into sprites
  4.   global SFirstBox
  5.   repeat with i = 0 to 4
  6.     puppetSprite (SFirstBox + i), TRUE
  7.   end repeat
  8.   
  9.   -- Setup box swap variable
  10.   global boxSet
  11.   set boxSet = "A"
  12.   
  13.   -- If we're here because we're returning from a detail screen then
  14.   -- we want to return to the same page number we came from, else
  15.   -- we want to go to page 1
  16.   
  17.  --**  puppetTransition 2, 1, 40, FALSE
  18.   global returnFromDetail, KidDemosOnly, KidDemosPageOn
  19.   if returnFromDetail = TRUE then
  20.     set returnFromDetail = FALSE -- turn the flag off
  21.     global gDetailProductSelected, gTitlesSelected
  22.     
  23.     if gTitlesSelected <> [] then
  24.       set prodNumber = getPos(gTitlesSelected, gDetailProductSelected)
  25.     else
  26.       set prodNumber to 0
  27.     end if
  28.     
  29.     if prodNumber = 0 then
  30.       -- Couldn't find it in the currently selected titles, so just return to the last summary page they were on
  31.       global gSummaryScreenPageNumber
  32.       ResetSummaryScreenInfo(gSummaryScreenPageNumber)
  33.     else
  34.       -- Found it!  Calculate the correct page...
  35.       set curScreen = integer((prodNumber -1)/ 5) + 1
  36.       ResetSummaryScreenInfo(curScreen)
  37.     end if
  38.     
  39.   else if KidDemosOnly = TRUE then
  40.     ResetSummaryScreenInfo(KidDemosPageOn)
  41.     
  42.   else
  43.     ResetSummaryScreenInfo(1)
  44.   end if
  45.   
  46.   -- Get ready for balloons
  47.   global KidDemosOnly
  48.   if KidDemosOnly = TRUE then
  49.     CheckBalloonChange("KidDemos")
  50.   else
  51.     CheckBalloonChange("Basic")
  52.   end if
  53.   
  54.   -- Get ready for click me sprite
  55.   global lastBoxOver, lastBoxOverStartTime
  56.   set lastBoxOver = 0
  57.   set lastBoxOverStartTime = the ticks + 60
  58. end