home *** CD-ROM | disk | FTP | other *** search
/ Club KidSoft Volume 3 #1 / ClubKidsoft.iso / movies / catalog.dir / 00127_Script_127 < prev    next >
Text File  |  1995-02-07  |  2KB  |  57 lines

  1. -- "GoDirect"
  2.  
  3. -- *** SPEED THIS UP
  4.  
  5. -- Can get here either: 
  6. --    1) returning from a demo
  7. --    2) clicked on BuyNow on cover and chose product in Find window
  8.  
  9. on exitFrame
  10.   cursor 4
  11.   
  12.   global gSaveReturnInfoFile, KidDemosOnly, KidDemosPageOn
  13.   
  14.   if FileExists(gSaveReturnInfoFile) then
  15.     set saveData = ReadFile(gSaveReturnInfoFile)
  16.     EraseFile(gSaveReturnInfoFile) -- uses fileio()
  17.     SetItemDelim(tab)
  18.     set KidDemosOnly = item 1 of saveData
  19.     set cat = item 2 of saveData
  20.     set age = item 3 of saveData
  21.     if KidDemosOnly = TRUE then
  22.       set KidDemosPageOn = integer(item 4 of saveData)
  23.     else
  24.       set productNumber = integer(item 4 of saveData)
  25.     end if
  26.     RestoreItemDelim
  27.     
  28.   else -- we're coming from BuyNow on cover
  29.     set cat = "All Products"
  30.     set age = "All Ages"
  31.     global BuyNowSelection
  32.     set productNumber = BuyNowSelection
  33.     
  34.     -- We need to be sure they can get back to the cover
  35.     global BuyNowFromCover
  36.     set BuyNowFromCover = TRUE
  37.   end if
  38.   
  39.   ClearReturnStack -- start from scratch
  40.   
  41.   if KidDemosOnly = TRUE then
  42.     -- Get ready for demos
  43.     SetCatalogMenus("All Demos", "All Ages")
  44.     GoToFrame("CatalogInit", "KidDemosExit")
  45.     
  46.   else
  47.     -- Do a little work to set up things for the detail screen...
  48.     SetCatalogMenus(cat, age)
  49.     
  50.     -- Cause the DBSelect to occur
  51.     ResetSummaryScreenInfo(1, FALSE) -- FALSE means don't refresh, just gets our variable set up correctly
  52.     
  53.     PushReturnTo("Cover") -- be sure they can get back to the cover
  54.     GoToProductDetail(productNumber, "CatalogInit")
  55.   end if
  56. end
  57.