home *** CD-ROM | disk | FTP | other *** search
/ Stickerpedia Stickerbook / Stickerbook.iso / pc / DATA / objects.cxt / 00081_Script_oDataScreen < prev    next >
Text File  |  2003-03-19  |  42KB  |  1,400 lines

  1. --¨
  2. oDataScreen
  3.  
  4.  
  5. global  oHQ
  6. global  oMarvin
  7. global  oDatabase
  8. global  oDataScreen
  9. global  oSpr
  10. global  oAssetHQ
  11. global  gDisplayDebugInfoWindow
  12. global  gDisplayDebugSortOrder
  13. global  oBookMark
  14. global  oTouchOfAButton
  15. global  gScrollAmountList
  16. global  oFileIO
  17. global  gPathDelim
  18. global  gHouseKeepingFlag
  19.  
  20.  
  21.  
  22. property  pTextMemberList
  23. property  pNumOfRecordRows
  24. property  pListOfRecordsPerRow
  25. property  pCurrentlyDisplayedRowRecords
  26. property  pKeyWordPrioritised
  27.  
  28. property  pCallingMovieSelection
  29. property  pCallingSection
  30.  
  31. property  pCurRecDetailsLst         -- property list containiing details for the currently displayed record 
  32. -------------------------------------- Porperties: #ba, #bo,  #la, #tl, #vi, #te, #au
  33.  
  34. property  pCurRecordList            -- list of records belonging to the current keyword pair, or the current special selection
  35.  
  36. property  pCurKWSetSpriteList       -- list of sprites used to display keywords
  37. property  pRecordSpriteList         -- list of sprites used to display records
  38.  
  39. property  pCurKWP                   -- curently displayed keyword pair
  40. property  pCurRecord                -- record number currently on display
  41.  
  42. property  pCurRecType               -- currently displayed record type (#ba, #bo, #la, #tl, #vi, #te, #au)
  43.  
  44. property  pTextMemberName           -- the membername that is use to display text
  45. property  pSinoTextMemberName       -- the membername that is use to display text, when the record is a sino record
  46. property  pBookTextMemberNameLst    -- this list holds the membernames into which book text get imported
  47. property  pBookPicMemberNameLst     -- this list holds the membernames into which book pictures get imported
  48.  
  49. property  pPictureSprite            -- the spritenumber of the sprite that is use to display pictures
  50. property  pLargePictureSprite       -- the spritenumber of the sprite that is use to display pictures
  51. property  pVideoSprite              -- the spritenumber of the sprite that is use to display video
  52. property  pSpecialSprList              -- a list containing the spritenumbers used for book records
  53. property  pSpecialSprListCount         -- pSpecialSprList.count
  54.  
  55. property  pCurNumOfBookAssets       -- number of sprites/assets used to display the current book record
  56. property  pBookAssetList            -- contains a list of the asset names used to display the current book record format: ["8103_1_basic_t": "importBookText 1", etc. ]
  57.  
  58. property  pCurNumOfTLAssets         -- number of sprites/assets used to display the current timeline record
  59. property  pTLAssetList              -- contains a list of the asset names used to display the current timeline record format: ["8103_1_basic_t": "importBookText 1", etc. ]
  60.  
  61. property  pPicSeqSpriteList         -- contains a list of the sprites which display the buttons to click through picture sequences 
  62. property  pLeftBackgroundSprite     -- the spritenumber of the left background sprite
  63. property  pRightBackgroundSprite    -- the spritenumber of the right background sprite
  64.  
  65.  
  66. property  pPicSequenceDetails       -- the file names of the pictures contained in a picture sequence
  67. property  pCurLargePicName          -- when applicable, the name of a large picture; when not applicable, this is set to ""
  68.  
  69. property  pNumOfTopBananas          -- the number of keyword pairs which are entered into the top banana list
  70.  
  71.  
  72. property  pTLRecDetailsList         -- this list get used to collect sprite location, ink etc info for timeline  records
  73. property  pBookRecDetailsList       -- this list get used to collect sprite location, ink etc info for book records
  74.  
  75. property  pRecIcoRolTxt             -- this property list contains an entry for every record with the first words of the caption for rollovers
  76.  
  77. property  pRecIcoRolField           -- testing, testing
  78.  
  79. property  pRecIcoRolFieldIdx        -- testing, testing
  80.  
  81.  
  82. property  pLastFreeRAMSize          -- used for debugging and tracking of memory
  83.  
  84. property  pPrinting
  85.  
  86.  
  87. property  ancestor
  88.  
  89.  
  90.  
  91. property  pMinDistance
  92.  
  93.  
  94. on new me, updateMode
  95.   
  96.   addObject me
  97.   
  98.   pLeftBackgroundSprite    = 3
  99.   pRightBackgroundSprite   = 4
  100.   pPictureSprite           = 115
  101.   pLargePictureSprite      = 300
  102.   
  103.   pTextMemberName          = "importText"
  104.   pSinoTextMemberName      = "importTextSino"
  105.   pBookTextMemberNameLst   = ["importBookText 01", "importBookText 02", "importBookText 03", "importBookText 04", "importBookText 05"]
  106.   pBookPicMemberNameLst    = ["importPictureBook 01", "importPictureBook 02", "importPictureBook 03", "importPictureBook 04"]
  107.   
  108.   pVideoSprite             = 117
  109.   pMinDistance             = 10
  110.   pCurNumOfBookAssets      = 0
  111.   
  112.   pCurKWSetSpriteList      = [152, 155, 158, 161, 164, 167]
  113.   pRecordSpriteList        = [17, 22, 27, 32, 37, 42, 47]
  114.   pPicSeqSpriteList        = [120,121,122,123,124,125,126,127,128]
  115.   
  116.   pSpecialSprList          = [100, 101, 102, 103, 104, 105, 106, 107, 108]
  117.   pSpecialSprListCount     = pSpecialSprList.count
  118.   
  119.   pNumOfTopBananas         = 14
  120.   
  121.   pNumOfRecordRows         = 1
  122.   pCurRecordList           = []
  123.   pTLRecDetailsList        = [:]
  124.   
  125.   the ancestor of me = new(script "oDataScreenBaby")
  126.   
  127.   getListsFromFile me
  128.   
  129.   if updateMode = #update then
  130.     update me
  131.   end if
  132.   
  133.   return me  
  134.   
  135. end
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. on info me
  145.   
  146.   outPut = "pCallingSection" & ":" && pCallingSection & RETURN
  147.   output = outPut & "pCurKWP" & ":" && pCurKWP  & RETURN
  148.   
  149.   output = outPut & "pCurRecordList" & ":" && pCurRecordList   & RETURN
  150.   output = outPut & "pCurRecType" & ":" && pCurRecType  & RETURN
  151.   output = outPut & "pCurRecord" & ":" && pCurRecord   & RETURN
  152.   output = outPut & "pCurRecDetailsLst" & ":" && pCurRecDetailsLst  & RETURN 
  153.   
  154.   put outPut
  155.   return outPut
  156. end
  157.  
  158.  
  159.  
  160.  
  161.  
  162. on getListsFromFile me
  163.   
  164.   loFileIO = new(script "oFileIO")
  165.   
  166.   pTLRecDetailsList     = value(getFile (loFileIO, the pathname & "~lists" & gPathDelim & "datascreen" & gPathDelim, "timelinedata.ini"))
  167.   
  168.   pBookRecDetailsList   = value(getFile (loFileIO, the pathname & "~lists" & gPathDelim & "datascreen" & gPathDelim, "bookdata.ini"))
  169.   
  170.   pRecIcoRolField       = (getFile (loFileIO, the pathname & "~lists" & gPathDelim & "datascreen" & gPathDelim, "pRecIcoRolField.ini"))
  171.   
  172.   pRecIcoRolFieldIdx    = value(getFile (loFileIO, the pathname & "~lists" & gPathDelim & "datascreen" & gPathDelim, "pRecIcoRolFieldIdx.ini"))
  173.   
  174.   
  175.   loFileIO = void
  176.   
  177. end
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184. on update me
  185.   
  186.   pRecIcoRolTxt      = duplicate(oDataBase.pRecordStatus)
  187.   pRecIcoRolFieldIdx = [:]
  188.   pRecIcoRolField    = ""
  189.   
  190.   repeat with n = 1 to oDataBase.pNumOfRecords
  191.     
  192.     pRecIcoRolTxt[n] = ""
  193.     
  194.     curRecordNumber = pRecIcoRolTxt.getPropAt(n)
  195.     
  196.     if (curRecordNumber.char[1] = 6)  then 
  197.       theTextMember   = curRecordNumber & "_1_time_t"
  198.     else
  199.       theTextMember   = curRecordNumber & "_1_basic_t"
  200.     end if
  201.     
  202.     tempText = member(theTextMember, "text").char[1..140] 
  203.     
  204.     tempLength = (tempText.length) 
  205.     returnChar = RETURN
  206.     repeat with curChar = 1 to tempLength
  207.       if tempText.char[curChar] = RETURN then put " " into char curChar of tempText
  208.     end repeat
  209.     curLine = (pRecIcoRolField.lines.count) + 1
  210.     pRecIcoRolFieldIdx.addProp(curRecordNumber,curLine)
  211.     
  212.     pRecIcoRolField = pRecIcoRolField & curRecordNumber & "#" & tempText & "..." & RETURN 
  213.     
  214.   end repeat
  215.   
  216.   
  217.   
  218.   loFileIO = new(script "oFileIO")
  219.   
  220.   writeFile loFileIO, the pathname & "~lists" & gPathDelim & "datascreen" & gPathDelim, "pRecIcoRolField.ini",   pRecIcoRolField
  221.   writeFile loFileIO, the pathname & "~lists" & gPathDelim & "datascreen" & gPathDelim, "pRecIcoRolFieldIdx.ini",   pRecIcoRolFieldIdx
  222.   
  223.   
  224.   loFileIO = void
  225.   tempText = tempText && "New oDataScreen list files saved:" && the long time
  226.   
  227.   member("updating log internal", "objects").text = member("updating log internal", "objects").text & RETURN & RETURN & tempText
  228.   
  229. end
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236. on getRecRollText me, recordnumber
  237.   saveDelim         = the itemdelimiter
  238.   the itemdelimiter = "#"
  239.   theLine           = (pRecIcoRolFieldIdx[recordnumber])-1
  240.   -- put "theLine" && theLine
  241.   if theline = void then
  242.     retVal = "n/a"
  243.   else
  244.     retVal            = pRecIcoRolField.line[theLine].item[2]
  245.     the itemdelimiter = saveDelim
  246.   end if
  247.   return retVal
  248. end
  249.  
  250.  
  251.  
  252.  
  253.  
  254. on trackAssetindex me, recordNumber
  255.   put oAssetHQ.pAssetIndex[recordNumber]  
  256. end
  257.  
  258.  
  259.  
  260.  
  261.  
  262. on checkSino me
  263.   put "pCurRecType: " & pCurRecType
  264. end
  265.  
  266.  
  267.  
  268.  
  269. on standToAttention me, callingSection, chosenSelection
  270.   
  271.   
  272.   pCallingSection = callingSection
  273.   
  274.   
  275.   case pCallingSection of
  276.       
  277.       
  278.     #touchOfAButtonTime:
  279.       
  280.       pCurRecordList = oTouchOfAButton.pTimeRecList
  281.       
  282.       recordToDisplay = pCurRecordList[1]
  283.       pCurRecord      = recordToDisplay
  284.       
  285.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  286.       pCurRecType       = result[#type]
  287.       pCurRecDetailsLst = duplicate(result[#details])
  288.       
  289.       tell the stage to go string(pCurRecType) of movie "datascrn"
  290.       
  291.       
  292.       
  293.     #touchOfAButtonBook:
  294.       
  295.       pCurRecordList = oTouchOfAButton.pBookRecList
  296.       
  297.       recordToDisplay = pCurRecordList[1]
  298.       pCurRecord      = recordToDisplay
  299.       
  300.       
  301.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  302.       pCurRecType       = result[#type]
  303.       pCurRecDetailsLst = duplicate(result[#details])
  304.       
  305.       tell the stage to go string(pCurRecType) of movie "datascrn"
  306.       
  307.       
  308.     #bookmark:
  309.       
  310.       oDataBase.pKWPSortOrder = oBookMark.pBookMarkList[chosenSelection][#sortorder]
  311.       pCurRecordList = oBookMark.pBookMarkList[chosenSelection][#recordList]
  312.       
  313.       
  314.       -- member("KeywordCaption", "shared").text = RETURN & "Bookmark Selection:" & RETURN & ""
  315.       member("KeywordCaption", "shared").text = " "
  316.       
  317.       recordToDisplay = pCurRecordList[1]
  318.       pCurRecord      = recordToDisplay
  319.       
  320.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  321.       pCurRecType       = result[#type]
  322.       pCurRecDetailsLst = duplicate(result[#details])
  323.       
  324.       -- checkSino me ------------------------------------------------------
  325.       
  326.       tell the stage to go string(pCurRecType) of movie "datascrn"
  327.       
  328.       
  329.     #datascreen:
  330.       pCurKWP = oDatabase.pKWPSortOrder[1]
  331.       pCurRecordList  = oDatabase.pKWToRecNum.getProp(pCurKWP)
  332.       recordToDisplay = pCurRecordList[1]
  333.       pCurRecord      = recordToDisplay
  334.       
  335.       -- get the details for the first record:
  336.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  337.       pCurRecType       = result[#type]
  338.       pCurRecDetailsLst = duplicate(result[#details])
  339.       
  340.       put "pCurRecType: " & pCurRecType
  341.       
  342.       -- checkSino me ------------------------------------------------------
  343.       
  344.       displayCurKWP me
  345.       displayKWPIcons me
  346.       dotheDisplaying me
  347.       go string(pCurRecType)
  348.       
  349.       
  350.     #themes:
  351.       keyWordName     = ("k" & chosenSelection)
  352.       callingString = oDatabase.pKWCodeToKWName[keyWordName]
  353.       pCurRecordList = themesIconToRecordList (callingString)
  354.       -- member("KeywordCaption", "shared").text = RETURN & "Themes Selection:" & RETURN & callingString
  355.       member("KeywordCaption", "shared").text = " "
  356.       
  357.       put "pCurRecordList" && pCurRecordList
  358.       --      pCurRecordList  = oDataBase.pKWToRecList[keyWordName]
  359.       recordToDisplay = pCurRecordList[1]
  360.       pCurRecord      = recordToDisplay
  361.       
  362.       -- get the details for the first record:
  363.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  364.       pCurRecType       = result[#type]
  365.       pCurRecDetailsLst = duplicate(result[#details])
  366.       
  367.       -- checkSino me ------------------------------------------------------
  368.       
  369.       put "oDataBase.pKWtoKWP[keyWordName]" && oDataBase.pKWtoKWP[keyWordName]
  370.       reshuffleMultiple me, oDataBase.pKWtoKWP[keyWordName]
  371.       
  372.       --  put oDataBase.pKWPSortOrder[1]
  373.       go string(pCurRecType) of movie "datascrn"
  374.       
  375.       
  376.       
  377.     #index:
  378.       pCurRecordList = indexEntryToRecordList(chosenSelection)
  379.       -- member("KeywordCaption", "shared").text = RETURN & "Index Selection:" & RETURN & chosenSelection
  380.       member("KeywordCaption", "shared").text = " "
  381.       
  382.       recordToDisplay = pCurRecordList[1]
  383.       pCurRecord      = recordToDisplay
  384.       
  385.       -- get the details for the first record:
  386.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  387.       pCurRecType       = result[#type]
  388.       pCurRecDetailsLst = duplicate(result[#details])
  389.       
  390.       put "pCurRecordList" && pCurRecordList
  391.       -- checkSino me ------------------------------------------------------
  392.       
  393.       argument = []
  394.       argument.add(oDataBase.pRecNumToKW[pCurRecordList[1]][1])
  395.       argument.add(oDataBase.pRecNumToKW[pCurRecordList[1]][2])
  396.       reshuffleSimple me, argument
  397.       
  398.       go string(pCurRecType) of movie "datascrn"
  399.       
  400.       
  401.     #maps:
  402.       pCurRecordList = mapLinkToRecordList(chosenSelection)
  403.       recordToDisplay = pCurRecordList[1]
  404.       pCurRecord       = recordToDisplay
  405.       -- member("KeywordCaption", "shared").text = RETURN & "Themes Selection:" & RETURN & chosenSelection
  406.       -- member("KeywordCaption", "shared").text = RETURN & "Map Selection:" & RETURN
  407.       member("KeywordCaption", "shared").text = " "
  408.       
  409.       
  410.       -- get the details for the first record:
  411.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  412.       pCurRecType       = result[#type]
  413.       pCurRecDetailsLst = duplicate(result[#details])
  414.       
  415.       -- checkSino me ------------------------------------------------------
  416.       
  417.       argument = []
  418.       argument.add(oDataBase.pRecNumToKW[pCurRecordList[1]][1])
  419.       argument.add(oDataBase.pRecNumToKW[pCurRecordList[1]][2])
  420.       reshuffleSimple me, argument
  421.       
  422.       go string(pCurRecType) of movie "datascrn"
  423.       
  424.       
  425.       
  426.     #introduction:
  427.       pCurRecordList  = introButtonToRecordList (chosenSelection)
  428.       -- member("KeywordCaption", "shared").text = RETURN & "Introduction Selection:" & RETURN & ""
  429.       member("KeywordCaption", "shared").text = " "
  430.       
  431.       recordToDisplay = pCurRecordList[1]
  432.       pCurRecord      = recordToDisplay
  433.       
  434.       -- get the details for the first record:
  435.       result = oAssetHQ.pAssetIndex[recordToDisplay]
  436.       pCurRecType       = result[#type]
  437.       pCurRecDetailsLst = duplicate(result[#details])
  438.       
  439.       -- checkSino me ------------------------------------------------------
  440.       
  441.       argument = []
  442.       argument.add(oDataBase.pRecNumToKW[pCurRecordList[1]][1])
  443.       argument.add(oDataBase.pRecNumToKW[pCurRecordList[1]][2])
  444.       reshuffleSimple me, argument
  445.       
  446.       go string(pCurRecType) of movie "datascrn"
  447.       
  448.       
  449.     otherwise
  450.       -- put "otherwise: "
  451.       --  reshuffle me, pCurKWP
  452.       go string(pCurRecType) of movie "datascrn"
  453.       
  454.       
  455.   end case 
  456.   
  457.   
  458. end
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467. on dotheDisplaying me
  468.   if listP(pCurrentlyDisplayedRowRecords) then firstSpriterecordNumber = pCurrentlyDisplayedRowRecords[1]
  469.   
  470.   recordStatusVisited oDataBase, firstSpriterecordNumber
  471.   recordSelected me, firstSpriterecordNumber
  472.   
  473. end
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484. on displayKWPIcons me
  485.   
  486.   
  487.   -- his handler displays all the icons of the top seven keyword pairs
  488.   -- it also sets 'pCurKWP' whcih contains the displayed record
  489.   
  490.   -- put "pCurKWP: " & pCurKWP
  491.   pCurKWP = oDatabase.pKWPSortOrder[1]
  492.   
  493.   
  494.   keyWord1 = "k" & pCurKWP.char[1..2]
  495.   keyWord2 = "k" & pCurKWP.char[3..4]
  496.   
  497.   
  498.   if gDisplayDebugInfoWindow then
  499.     -- display status info for debugging
  500.     member("statusCurrentKW1").text = keyWord1
  501.     member("statusCurrentKW2").text = keyWord2
  502.     
  503.     member("statusCurrentKW1Name").text = oDatabase.pKWCodeToKWName[keyWord1]
  504.     member("statusCurrentKW2Name").text = oDatabase.pKWCodeToKWName[keyWord2]
  505.     
  506.     updateInfoWindow
  507.   end if
  508.   
  509.   -- display correct backgrounds:
  510.   
  511.   if pCallingSection = #themes or pCallingSection = #datascreen then
  512.     firstKeyWord = pCurKWP.char[1..2]
  513.     sprite(pLeftBackgroundSprite).member = member(keyWord1 && "left", "backgrounds")
  514.     sprite(pRightBackgroundSprite).member = member(keyWord1 && "right", "backgrounds")
  515.     
  516.   else
  517.     selectBackground  
  518.   end if
  519.   
  520.   
  521.   
  522.   pTextMemberList = []  
  523.   
  524.   repeat with pointer = 2 to 7
  525.     curKeyWordPair = oDatabase.pKWPSortOrder[pointer]
  526.     firstRecord = (oDatabase.pKWToRecNum.getaProp(curKeyWordPair))[1]
  527.     
  528.     -- get icon name:
  529.     curIconName   = firstRecord & "_icon"
  530.     
  531.     -- get rollover text:
  532.     curCaptureName = firstRecord & "_1_basic_t"
  533.     
  534.     -- display icon:
  535.     sprite(pCurKWSetSpriteList[pointer-1]).member = member (curIconName, "icons")
  536.     
  537.     -- display status:
  538.     modify oSpr, (pCurKWSetSpriteList[pointer-1])-1, getKeyWordPairState(me, curKeyWordPair)
  539.     
  540.     add pTextMemberList, curCaptureName
  541.   end repeat
  542.   
  543. end
  544.  
  545.  
  546.  
  547. on displayCurSpecialSelection me
  548.   
  549.   -- this handler displays all the records contained in the current special selection:
  550.   pListOfRecordsPerRow = []
  551.   
  552.   noOfRecords          = count(pCurRecordList)
  553.   remainder            = noOfRecords mod 7
  554.   
  555.   if remainder = 0 then
  556.     pNumOfRecordRows = noOfRecords / 7
  557.   else
  558.     pNumOfRecordRows = noOfRecords / 7 + 1
  559.   end if
  560.   
  561.   repeat with n = 1 to pNumOfRecordRows
  562.     add pListOfRecordsPerRow, []
  563.   end repeat
  564.   
  565.   set rowNumber = 0
  566.   
  567.   repeat with x = 1 to pNumOfRecordRows
  568.     addThis = (rowNumber*7)
  569.     startNumber = 1+addThis
  570.     endNumber   = 7+addThis
  571.     if endNumber > noOfRecords then endNumber = noOfRecords
  572.     repeat with n = startNumber to endNumber
  573.       curRecNumber   = getAt(pCurRecordList,n)
  574.       curIconName    = getAt(pCurRecordList,n) & "_icon"
  575.       curCaptureName = getAt(pCurRecordList,n) & "_1_basic_t"
  576.       add (getAt(pListOfRecordsPerRow, (rowNumber+1))), curRecNumber
  577.     end repeat
  578.     rowNumber = rowNumber + 1
  579.   end repeat
  580.   
  581.   selectRow me, 1
  582.   
  583.   
  584. end
  585.  
  586.  
  587.  
  588. on displayCurKWP me
  589.   
  590.   -- this handler displays all record icons for the current keyword pair
  591.   
  592.   pListOfRecordsPerRow = []
  593.   pCurRecordList       = getProp(oDatabase.pKWToRecNum, pCurKWP)
  594.   noOfRecords          = count(pCurRecordList)
  595.   remainder            = noOfRecords mod 7
  596.   
  597.   if remainder = 0 then
  598.     pNumOfRecordRows = noOfRecords / 7
  599.   else
  600.     pNumOfRecordRows = noOfRecords / 7 + 1
  601.   end if
  602.   
  603.   repeat with n = 1 to pNumOfRecordRows
  604.     add pListOfRecordsPerRow, []
  605.   end repeat
  606.   
  607.   set rowNumber = 0
  608.   
  609.   repeat with x = 1 to pNumOfRecordRows
  610.     addThis = (rowNumber*7)
  611.     startNumber = 1+addThis
  612.     endNumber   = 7+addThis
  613.     if endNumber > noOfRecords then endNumber = noOfRecords
  614.     repeat with n = startNumber to endNumber
  615.       curRecNumber   = getAt(pCurRecordList,n)
  616.       curIconName    = getAt(pCurRecordList,n) & "_icon"
  617.       curCaptureName = getAt(pCurRecordList,n) & "_1_basic_t"
  618.       add (getAt(pListOfRecordsPerRow, (rowNumber+1))), curRecNumber
  619.     end repeat
  620.     rowNumber = rowNumber + 1
  621.   end repeat
  622.   
  623.   selectRow me, 1
  624.   
  625.   --update the display in the bottom right corner
  626.   curKWPCode         = oDataScreen.pCurKWP
  627.   kwpName1 = oDatabase.pKWCodeToKWName["k" & curKWPCode.char[1..2]]   
  628.   kwpName2 = oDatabase.pKWCodeToKWName["k" & curKWPCode.char[3..4]]   
  629.   sendAllSprites #kwpSelected, kwpName1, kwpName2
  630.   
  631. end
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639. on selectRow me, callingID
  640.   cursor 4
  641.   pCurrentlyDisplayedRowRecords = pListOfRecordsPerRow[callingID]
  642.   recordsToDisplay = count(pCurrentlyDisplayedRowRecords)
  643.   
  644.   -- change icons:
  645.   repeat with n = 1 to recordsToDisplay
  646.     curSprite = pRecordSpriteList[n]
  647.     sprite(curSprite).member   = member ( ((pCurrentlyDisplayedRowRecords[n]) & "_icon"), "icons")
  648.     sprite(curSprite).visible  = 1  
  649.     sprite(curSprite-1).visible  = 1  
  650.   end repeat
  651.   
  652.   -- make unnecessary icons invisible:
  653.   numberOfInvisibleSprites = 7 - recordsToDisplay
  654.   
  655.   if numberOfInvisibleSprites then
  656.     repeat with n = 7 down to (recordsToDisplay+1)
  657.       sprite(pRecordSpriteList[n]).visible = 0  
  658.       sprite(pRecordSpriteList[n]-1).visible = 0  
  659.     end repeat
  660.   end if
  661.   
  662.   -- select first icon
  663.   sendAllSprites #selectFirstIcon
  664.   
  665. end 
  666.  
  667.  
  668.  
  669.  
  670. on selectKeyWord me, callingKeyWordPair  
  671.   
  672.   reshuffle me, callingKeyWordPair
  673.   
  674.   standToAttention me, #datascreen  
  675.   
  676.   sendAllsprites #updateRecordButton
  677.   
  678.   -- put "callingKeyWordPair" && callingKeyWordPair
  679.   
  680.   
  681.   kwpName1 = oDatabase.pKWCodeToKWName["k" & callingKeyWordPair.char[1..2]]   
  682.   kwpName2 = oDatabase.pKWCodeToKWName["k" & callingKeyWordPair.char[3..4]]   
  683.   
  684.   
  685.   sendAllSprites #kwpSelected, kwpName1, kwpName2
  686.   sendAllSprites #checkMoreSprite
  687.   
  688. end
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699. on recordSelected me, recordNumber 
  700.   
  701.   pCurRecord = recordNumber
  702.   -- get the details for this record:
  703.   
  704.   result            = oAssetHQ.pAssetIndex[recordNumber]
  705.   
  706.   
  707.   pCurRecDetailsLst = duplicate(result[#details])
  708.   pCurRecType       = result[#type]
  709.   
  710.   
  711.   if pCurRecType = #notFound then
  712.     exit
  713.   end if
  714.   
  715.   displayRecord me, recordnumber
  716.   
  717. end
  718.  
  719.  
  720.  
  721.  
  722. on beginBookSpriteNew me
  723.   
  724.   put "pCurRecord: " & pCurRecord
  725.   startTimer
  726.   theDetails        = pBookRecDetailsList[pCurRecord]
  727.   
  728.   --put "theDetails: " & theDetails
  729.   
  730.   spriteInfoList    = theDetails[#sprInf]
  731.   gScrollAmountList = [#book: (theDetails[#ScrollH])]
  732.   numOfSprites      = spriteInfoList.count 
  733.   
  734.   
  735.   repeat with pointer = 1 to numOfSprites
  736.     
  737.     curSpriteDetails = spriteInfoList[pointer]
  738.     curSprite = curSpriteDetails[1]
  739.     
  740.     sprite(curSprite).member  = curSpriteDetails[2]
  741.     sprite(curSprite).loc     = curSpriteDetails[3]
  742.     sprite(curSprite).ink     = curSpriteDetails[4]
  743.     sprite(curSprite).visible = 1
  744.     
  745.   end repeat
  746.   
  747.   the updateLock = 0
  748.   updatestage
  749.   timeProcess "beginBookSprite"
  750. end
  751.  
  752.  
  753.  
  754.  
  755.  
  756. on beginBookSprite me, callingSprite
  757.   
  758.   
  759.   pMinDistance = 10
  760.   tempList     = []
  761.   
  762.   -- assign members to the sprites
  763.   repeat with pointer = 1 to pCurNumOfBookAssets
  764.     
  765.     
  766.     if pointer > pSpecialSprList.count then exit repeat
  767.     
  768.     
  769.     if pBookAssetList.count then
  770.       
  771.       thisSprite = pSpecialSprList[pointer]
  772.       thisMember = pBookAssetList[pointer]
  773.       
  774.       sprite(thisSprite).member = thisMember
  775.       
  776.       tempList.add([thisSprite,thisMember])
  777.       
  778.     end if
  779.     
  780.     
  781.     -- sprite(pSpecialSprList[pointer]).member = pBookAssetList[pointer]
  782.     
  783.     
  784.   end repeat
  785.   -- put "tempList: " & tempList
  786.   --  timeprocess "beginBookSprite: assign members to the sprites"
  787.   
  788.   -- put "pCurRecord: " & pCurRecord
  789.   
  790.   -- now position them, (starting three pixels from the top)
  791.   curBottom   = 3
  792.   totalHeight = pMinDistance + pMinDistance
  793.   
  794.   repeat with pointer = 1 to pCurNumOfBookAssets
  795.     mbrHeight    = member(pBookAssetList[pointer], "database").height
  796.     mbrType      = member(pBookAssetList[pointer], "database").type
  797.     totalHeight  = totalHeight + mbrHeight
  798.     theSpriteNum = pSpecialSprList[pointer]
  799.     theInk       = 0
  800.     
  801.     
  802.     pMinDistance = 10
  803.     
  804.     case mbrType of
  805.         
  806.       #bitmap:
  807.         picHeightOffset = (mbrHeight/2) + pMinDistance 
  808.         newLocV         = curBottom + picHeightOffset 
  809.         
  810.         theInk          = 0
  811.         
  812.       #text, #field:
  813.         sprite(theSpriteNum).locH = 160
  814.         theInk          = 36
  815.         
  816.         newLocV = curBottom + pMinDistance + (pMinDistance/2)
  817.         
  818.     end case
  819.     
  820.     sprite(theSpriteNum).ink = theInk
  821.     curBottom = curBottom + mbrHeight
  822.     -- wolf changed following line 20/11
  823.     -- was: sprite(pSpecialSprList[pointer]).locV = newLocV
  824.     sprite(pSpecialSprList[pointer]).locV = newLocV + pMinDistance
  825.     thelocH = sprite(pSpecialSprList[pointer]).locH
  826.     
  827.     tempList[pointer].add( point(thelocH, newLocV) )
  828.     tempList[pointer].add(theInk)
  829.     
  830.   end repeat
  831.   
  832.   scrollAmount = totalHeight-540
  833.   
  834.   gScrollAmountList = [#book: scrollAmount]
  835.   
  836.   repeat with pointer = 1 to pCurNumOfBookAssets
  837.     sprite(pSpecialSprList[pointer]).visible = 1
  838.   end repeat
  839.   
  840.   thisRecData = [:]
  841.   
  842.   thisRecData.addProp(#sprInf, tempList)
  843.   thisRecData.addProp(#scrollH, scrollAmount)
  844.   
  845.   pBookRecDetailsList.addProp(pCurRecord, thisRecData)
  846.   
  847.   --put "pBookRecDetailsList: " & pBookRecDetailsList
  848.   the updateLock = 0
  849.   updatestage
  850.   -- doStage oMarvin
  851.   
  852.   -- timeprocess "beginBookSprite"
  853.   cursor -1
  854. end
  855.  
  856.  
  857.  
  858.  
  859. on beginTLSpriteNew me, callingSprite
  860.   
  861.   --put "pCurRecord: " & pCurRecord
  862.   startTimer
  863.   theDetails        = pTLRecDetailsList[pCurRecord]
  864.   
  865.   --put "theDetails: " & theDetails
  866.   
  867.   spriteInfoList    = theDetails[#sprInf]
  868.   gScrollAmountList = [#timeline: (theDetails[#ScrollH])]
  869.   numOfSprites      = spriteInfoList.count 
  870.   
  871.   
  872.   repeat with pointer = 1 to numOfSprites
  873.     
  874.     curSpriteDetails = spriteInfoList[pointer]
  875.     curSprite = curSpriteDetails[1]
  876.     
  877.     sprite(curSprite).member  = curSpriteDetails[2]
  878.     sprite(curSprite).loc     = curSpriteDetails[3]
  879.     sprite(curSprite).ink     = curSpriteDetails[4]
  880.     sprite(curSprite).visible = 1
  881.     
  882.   end repeat
  883.   
  884.   the updateLock = 0
  885.   updatestage
  886.   timeProcess "beginTLSprite"
  887.   cursor -1
  888. end
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895. on beginTLSprite me, callingSprite
  896.   
  897.   --oTouchOfAButton.pTimeRecDetails.addProp(oTouchOfAButton.pCurRecord,[])
  898.   
  899.   pMinDistance = 10
  900.   tempList     = []
  901.   
  902.   -- assign members to the sprites
  903.   
  904.   repeat with pointer = 1 to pCurNumOfTLAssets
  905.     
  906.     if pointer > pSpecialSprList.count then exit repeat
  907.     
  908.     
  909.     
  910.     if pTLAssetList.count then
  911.       
  912.       thisSprite = pSpecialSprList[pointer]
  913.       thisMember = pTLAssetList[pointer]
  914.       
  915.       sprite(thisSprite).member = thisMember
  916.       
  917.       tempList.add([thisSprite,thisMember])
  918.       
  919.     end if
  920.     
  921.   end repeat
  922.   
  923.   
  924.   -- now position them, (starting three pixels from the top)
  925.   curBottom   = 3
  926.   totalHeight = 0
  927.   
  928.   repeat with pointer = 1 to pCurNumOfTLAssets
  929.     mbrWidth    = member(pTLAssetList[pointer], "database").width
  930.     mbrHeight   = member(pTLAssetList[pointer], "database").height
  931.     mbrType     = member(pTLAssetList[pointer], "database").type
  932.     totalHeight = totalHeight + mbrHeight
  933.     theSpriteNum = pSpecialSprList[pointer]
  934.     
  935.     theInk = 0
  936.     
  937.     case mbrType of
  938.       #bitmap:
  939.         ------------------Changed by CwS on 3/10/00------------------
  940.         ------------------Was originally " if mbrHeight <= 70 "------
  941.         ------------------This caused the Sino to be out of place----
  942.         if mbrHeight <= 280 then
  943.           theInk = 39
  944.           newLocH = 308 --(mbrWidth/2) 
  945.           
  946.         else
  947.           theInk = 0     
  948.           newLocH =  (mbrWidth/2) + 170
  949.           
  950.         end if
  951.         
  952.         picHeightOffset = (mbrHeight/2) + pMinDistance
  953.         
  954.         newLocV = curBottom + picHeightOffset + pMinDistance
  955.         
  956.         
  957.         sprite(theSpriteNum).ink = theInk
  958.         
  959.       #text, #field:
  960.         sprite(theSpriteNum).locH = 160
  961.         sprite(theSpriteNum).ink = 36
  962.         
  963.         newLocV = curBottom + (pMinDistance*2)
  964.         newLocH =   + 170
  965.         theInk  = 1     
  966.         
  967.     end case
  968.     
  969.     
  970.     newLocV = (newLocV-pMinDistance*2)
  971.     curBottom = curBottom + mbrHeight
  972.     sprite(pSpecialSprList[pointer]).locV = newLocV
  973.     sprite(pSpecialSprList[pointer]).locH = newLocH
  974.     
  975.     tempList[pointer].add(point(newLocH, newLocV))
  976.     tempList[pointer].add(theInk)
  977.     
  978.   end repeat
  979.   
  980.   
  981.   scrollAmount = totalHeight-540
  982.   
  983.   gScrollAmountList = [#timeline: scrollAmount]
  984.   
  985.   repeat with pointer = 1 to pCurNumOfTLAssets
  986.     sprite(pSpecialSprList[pointer]).visible = 1
  987.   end repeat
  988.   
  989.   the updateLock = 0
  990.   updatestage
  991.   --doStage oMarvin
  992.   
  993.   thisRecData = [:]
  994.   
  995.   thisRecData.addProp(#sprInf, tempList)
  996.   thisRecData.addProp(#scrollH, scrollAmount)
  997.   
  998.   pTLRecDetailsList.addProp(pCurRecord, thisRecData)
  999.   
  1000. end
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009. on displayRecord me, recordnumber
  1010.   
  1011.   the updatelock = 1
  1012.   
  1013.   if voidP(recordnumber) and listP(pCurRecordList) then
  1014.     if pCurRecordList.count then
  1015.       recordnumber = pCurRecordList[1]
  1016.     end if
  1017.   end if
  1018.   
  1019.   member("debugcurrentRecord", "Internal").text = "Rec No:" && recordnumber
  1020.   repeat with n = 1 to 9
  1021.     sprite(pPicSeqSpriteList[n]).visible = 0
  1022.   end repeat
  1023.   
  1024.   pPicSequenceDetails = []
  1025.   pCurLargePicName    = ""
  1026.   
  1027.   
  1028.   case pCurRecType of 
  1029.       
  1030.     #timeline: 
  1031.       startTimer
  1032.       
  1033.       puppetsprite pPictureSprite, 0
  1034.       
  1035.       pTLAssetList      = [:]
  1036.       pCurNumOfTLAssets = 0
  1037.       
  1038.       numOfPics           = (pCurRecDetailsLst[#tl]).count
  1039.       numOfTexts          = (pCurRecDetailsLst[#te]).count
  1040.       
  1041.       pCurNumOfTLAssets   = numOfPics + numOfTexts
  1042.       
  1043.       -- put the assets into sequence:
  1044.       pTLAssetList                = [:]
  1045.       numberOfTextImportMember    = 1
  1046.       numberOfPictureImportMember = 1
  1047.       
  1048.       
  1049.       -- repeat with numberOfAsset = 1 to pCurNumOfTLAssets
  1050.       repeat with numberOfAsset = 1 to 9
  1051.         -- find numberOfAsset in either one of the lists
  1052.         thisAssetName = recordnumber & "_" & string(numberOfAsset) & "_time_"
  1053.         
  1054.         if (pCurRecDetailsLst[#tl]).getPos(thisAssetName & "p.jpg") then
  1055.           ----------------------------------------------------------------- this number is a picture:
  1056.           
  1057.           importFileName = ("importPictureBook" && string(numberOfPictureImportMember))
  1058.           pTLAssetList.addProp((thisAssetName & "p"), importFileName)
  1059.           getTLPicture oAssetHQ, thisAssetName & "p.jpg", numberOfPictureImportMember
  1060.           numberOfPictureImportMember = numberOfPictureImportMember + 1
  1061.           
  1062.         else if (pCurRecDetailsLst[#te]).getPos(thisAssetName & "t") then                                               
  1063.           ----------------------------------------------------------------- this number is text:
  1064.           importMemberName = "importBookText" && string(numberOfTextImportMember)
  1065.           pTLAssetList.addProp((thisAssetName & "t"), importMemberName)
  1066.           member(importMemberName, "database").text = member(( pCurRecDetailsLst[#te].getAt(numberOfTextImportMember) ),"text").text
  1067.           
  1068.           
  1069.           -- *** bone of contention starts here.
  1070.           
  1071.           originalStyleFirstLine   = the fontstyle of line 1 of member(( pCurRecDetailsLst[#te].getAt(numberOfTextImportMember) )) of castlib "text"
  1072.           
  1073.           put member(importMemberName, "database")
  1074.           member(importMemberName, "database").line[1].fontstyle = [symbol(originalStyleFirstLine)]
  1075.           
  1076.           originalFontSize = member(( pCurRecDetailsLst[#te].getAt(numberOfTextImportMember) ),"text").fontsize
  1077.           member(importMemberName, "database").fontsize = originalFontSize
  1078.           numberOfTextImportMember = numberOfTextImportMember + 1
  1079.           
  1080.           
  1081.         end if
  1082.       end repeat
  1083.       -- put "first part of timeline asset action" &&  the timer
  1084.       sendAllSprites #hide
  1085.       
  1086.       cursor 4
  1087.       
  1088.       
  1089.       if the frameLabel = "timeline" then
  1090.         sendAllSprites #beginsprite
  1091.         sendAllSprites #youAreAnOnlyChild
  1092.       else
  1093.         sendAllSprites #youAreAnOnlyChild
  1094.         go string(pCurRecType)
  1095.         --        sendAllSprites #hide
  1096.       end if
  1097.       
  1098.       pCurLargePicName = ""
  1099.       
  1100.       
  1101.       
  1102.       
  1103.       
  1104.       
  1105.     #book: 
  1106.       
  1107.       
  1108.       -- the updateLock = 1
  1109.       
  1110.       puppetsprite pPictureSprite, 0
  1111.       pBookAssetList      = [:]
  1112.       pCurNumOfBookAssets = 0
  1113.       
  1114.       numOfPics           = (pCurRecDetailsLst[#bo]).count
  1115.       numOfTexts          = (pCurRecDetailsLst[#te]).count
  1116.       pCurNumOfBookAssets = numOfPics + numOfTexts
  1117.       
  1118.       -- put the assets into sequence:
  1119.       pBookAssetList              = [:]
  1120.       numberOfTextImportMember    = 1
  1121.       numberOfPictureImportMember = 1
  1122.       
  1123.       repeat with numberOfAsset = 1 to pCurNumOfBookAssets
  1124.         -- find numberOfAsset in either one of the lists
  1125.         thisAssetName = recordnumber & "_" & string(numberOfAsset) & "_basic_"
  1126.         
  1127.         if (pCurRecDetailsLst[#bo]).getPos(thisAssetName & "p.jpg") then
  1128.           ----------------------------------------------------------------- this number is a picture:
  1129.           
  1130.           importFileName = ("importPictureBook" && string(numberOfPictureImportMember))
  1131.           pBookAssetList.addProp((thisAssetName & "p"), importFileName)
  1132.           getBookPicture oAssetHQ, thisAssetName & "p.jpg", numberOfPictureImportMember
  1133.           numberOfPictureImportMember = numberOfPictureImportMember + 1
  1134.           next repeat
  1135.           
  1136.         else if (pCurRecDetailsLst[#te]).getPos(thisAssetName & "t") then                                               
  1137.           ----------------------------------------------------------------- this number is text:
  1138.           importMemberName         = "importBookText" && string(numberOfTextImportMember)
  1139.           pBookAssetList.addProp((thisAssetName & "t"), importMemberName)
  1140.           member(importMemberName, "database").text = member(( pCurRecDetailsLst[#te].getAt(numberOfTextImportMember) ),"text").text
  1141.           member(importMemberName, "database").fontstyle = [#plain]
  1142.           
  1143.           -- *** bone of contention starts here.         
  1144.           originalFontSize         = member(( pCurRecDetailsLst[#te].getAt(numberOfTextImportMember) ),"text").fontsize
  1145.           
  1146.           --          originalStyleFirstLine   = member(( pCurRecDetailsLst[#te].getAt(numberOfTextImportMember) ),"text").line[1].fontstyle
  1147.           --          member(importMemberName, "database").line[1].fontstyle = originalStyleFirstLine
  1148.           
  1149.           originalStyleFirstLine   = the fontstyle of line 1 of member(( pCurRecDetailsLst[#te].getAt(numberOfTextImportMember) )) of castlib "text"
  1150.           --    set the fontstyle of line 1 of member(importMemberName) of castlib "database"  = originalStyleFirstLine
  1151.           -- member(importMemberName, "database").line[1].fontstyle = originalStyleFirstLine
  1152.           
  1153.           member(importMemberName, "database").line[1].fontstyle = [symbol(originalStyleFirstLine)]
  1154.           member(importMemberName, "database").fontsize = originalFontSize
  1155.           numberOfTextImportMember = numberOfTextImportMember + 1
  1156.         end if
  1157.       end repeat
  1158.       
  1159.       cursor 4
  1160.       
  1161.       if the frameLabel = "book" then
  1162.         sendAllSprites #hide
  1163.         sendAllSprites #beginsprite
  1164.         sendAllSprites #youAreAnOnlyChild
  1165.       else
  1166.         sendAllSprites #youAreAnOnlyChild
  1167.         go string(pCurRecType)
  1168.         --        sendAllSprites #hide
  1169.       end if
  1170.       
  1171.       pCurLargePicName = ""
  1172.       
  1173.       
  1174.       
  1175.     #standard: 
  1176.       -- Picture(s) + Caption    /     Picture + Big Picture + Caption   /   Pictures + caption + sino pic
  1177.       
  1178.       firstPicture = (pCurRecDetailsLst[#ba])[1]
  1179.       getBasicPicture oAssetHQ, firstPicture
  1180.       sprite(pPictureSprite).locV     = getBasicPicV(me, member("importPictureBasic","database"))
  1181.       member(pTextMemberName, "database").text = member(getAt(pCurRecDetailsLst[#te],1),"text").text
  1182.       
  1183.       chkForLargePic me, firstPicture
  1184.       
  1185.       -- now let's check whether the damn thing is a pic sequence:
  1186.       if pCurRecDetailsLst[#ba].count > 1 then  -- it is 
  1187.         pPicSequenceDetails = pCurRecDetailsLst[#ba]
  1188.         
  1189.         numberOfPictures = pPicSequenceDetails.count
  1190.         
  1191.         repeat with n = 1 to numberOfPictures
  1192.           sprite(pPicSeqSpriteList[n]).visible = 1
  1193.         end repeat
  1194.         -- put "pPicSequenceDetails: " & pPicSequenceDetails
  1195.         -- put "numberOfPictures: " & numberOfPictures
  1196.       end if
  1197.       
  1198.       
  1199.     #sino: 
  1200.       -- Sino pic with  Picture(s) + Caption    /     Picture + Big Picture + Caption   /   Pictures + caption + sino pic
  1201.       
  1202.       firstPicture = pCurRecDetailsLst[#ba][1]
  1203.       sinoPicture = pCurRecDetailsLst[#ba][2]
  1204.       getBasicPicture oAssetHQ, firstPicture
  1205.       getSinoPicture oAssetHQ, sinoPicture
  1206.       
  1207.       sprite(pPictureSprite).locV     = getBasicPicV(me, member("importPictureBasic","database"))
  1208.       member(pSinoTextMemberName, "database").text = member(getAt(pCurRecDetailsLst[#te],1),"text").text
  1209.       
  1210.       
  1211.       chkForLargePic me, firstPicture
  1212.       
  1213.       
  1214.       -- now let's check whether the damn thing is a pic sequence:
  1215.       if pCurRecDetailsLst[#ba].count > 2 then  -- it is 
  1216.         pPicSequenceDetails = pCurRecDetailsLst[#ba]
  1217.         pPicSequenceDetails.deleteAt(2) -- delete the sino pic
  1218.         numberOfPictures = pPicSequenceDetails.count
  1219.         
  1220.         repeat with n = 1 to numberOfPictures
  1221.           sprite(pPicSeqSpriteList[n]).visible = 1
  1222.         end repeat
  1223.         
  1224.       end if
  1225.       
  1226.       
  1227.       
  1228.     #video: 
  1229.       
  1230.       --      if (pCurRecDetailsLst[#ba]).count then
  1231.       --        videoPic = getAt(pCurRecDetailsLst[#ba],1)
  1232.       --        getBasicPicture oAssetHQ, videoPic
  1233.       --      end if
  1234.       
  1235.       
  1236.       videoFile = getAt(pCurRecDetailsLst[#vi],1)
  1237.       getVideo oAssetHQ, videoFile
  1238.       --  sprite(pPictureSprite).loc     = point(320, 183) -- this is the correct place so there is not jump when the video loads
  1239.       puppetsprite pPictureSprite, 0
  1240.       
  1241.       member(pTextMemberName, "database").text = member(getAt(pCurRecDetailsLst[#te],1),"text").text
  1242.       
  1243.       gHouseKeepingFlag = #stage
  1244.       
  1245.     #audio: 
  1246.       
  1247.       audioPic  = getAt(pCurRecDetailsLst[#ba],1)
  1248.       getBasicPicture oAssetHQ, audioPic
  1249.       
  1250.       audioFile = getAt(pCurRecDetailsLst[#au],1)
  1251.       getAudio oAssetHQ, audioFile
  1252.       
  1253.       sprite(pPictureSprite).locV     = getBasicPicV(me, member("importPictureBasic","database"))
  1254.       
  1255.       member(pTextMemberName, "database").text = member(getAt(pCurRecDetailsLst[#te],1),"text").text
  1256.       
  1257.       chkForLargePic me, audioPic
  1258.       
  1259.       gHouseKeepingFlag = #stage
  1260.       
  1261.       
  1262.     otherwise
  1263.       
  1264.       member("notFoundNumber").text = string(recordnumber)
  1265.       exit
  1266.   end case
  1267.   
  1268.   
  1269.   
  1270.   if gDisplayDebugInfoWindow then
  1271.     -- display some status info: 
  1272.     member("pCurRecType").text       = string(pCurRecType)
  1273.     if not voidP(recordnumber) then member("recordnumber", "shared").text      = string(recordnumber)
  1274.     
  1275.     
  1276.     
  1277.     
  1278.     if not voidP(pCurRecDetailsLst) then
  1279.       numOfDetails = pCurRecDetailsLst.count
  1280.       tempText     = ""
  1281.       possValues   = [#ba, #bo, #la, #tl, #vi, #te, #au]
  1282.       
  1283.       repeat with pointer = 1 to numOfDetails
  1284.         curList = pCurRecDetailsLst[possValues[pointer]]
  1285.         if curList.count then
  1286.           assetType = pCurRecDetailsLst.getPropAt(pointer)
  1287.           case assetType of
  1288.             #ba: assetType = "basic"
  1289.             #bo: assetType = "book"
  1290.             #la: assetType = "large"
  1291.             #tl: assetType = "time"
  1292.           end case
  1293.           tempText = tempText & assetType & ":" &&  string(curList) & RETURN & "-------------" & RETURN
  1294.         end if
  1295.       end repeat
  1296.       
  1297.       member("pCurRecDetailsLst").text = tempText
  1298.     end if
  1299.     
  1300.     updateInfoWindow
  1301.   end if
  1302.   
  1303.   if oHQ.pRunInDebugMode then
  1304.     ramInfo = checkRAM()
  1305.     newFreeRAM = ramInfo[1] 
  1306.     difference = newFreeRAM - pLastFreeRAMSize * -1
  1307.     pLastFreeRAMSize = newFreeRAM
  1308.     
  1309.     output = "New used:" && difference & RETURN
  1310.     output = output & "newFreeRAM" && ramInfo[2]
  1311.     output = output & RETURN
  1312.     if the runMode = "author" then
  1313.       --put output  
  1314.     else
  1315.       writeDebugInfo oHQ, output
  1316.     end if
  1317.   end if
  1318.   
  1319.   
  1320.   if not voidP(pCurRecType) or (pCurRecType = #book) then go string(pCurRecType)
  1321.   
  1322.   -------------------------Added by CwS on 2/11/00----------------------------------
  1323.   -------------------------This is used by the Scroll Bar Behavior-------------------
  1324.   sendAllSprites(#init_props)
  1325.   -----------------------------------------------------------------------------------
  1326.   -- find this
  1327.   -- the updatelock = 0
  1328.   the updateLock = 1
  1329.   
  1330. end
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339. on chkForLargePic me, basicPicname
  1340.   
  1341.   largePicName = basicPicname.char[1..6]  & "_large_p.jpg"
  1342.   
  1343.   if (pCurRecDetailsLst[#la]).getPos(largePicName) then
  1344.     sendAllSprites #youHaveABigBrother
  1345.     pCurLargePicName = largePicName
  1346.   else
  1347.     pCurLargePicName = ""
  1348.     sendAllSprites #youAreAnOnlyChild
  1349.   end if
  1350. end
  1351.  
  1352.  
  1353.  
  1354. on showLargePic me
  1355.   -- display the large version of the picture currently being viewed - if applicable
  1356.   cursor 4
  1357.   getLargePicture oAssetHQ, pCurLargePicName
  1358.   sprite (300).visible = 1
  1359.   cursor 301
  1360.   put "done it"
  1361. end
  1362.  
  1363.  
  1364.  
  1365. on switchTypeSixPicture me, callingID
  1366.   -- switch between the elements of the type six pic sequence, which is now part of 'standard'
  1367.   newPicture = pPicSequenceDetails[callingID]
  1368.   
  1369.   largePicName = newPicture.char[1..6]  & "_large_p.jpg"
  1370.   if (pCurRecDetailsLst[#la]).getPos(largePicName) then
  1371.     sendAllSprites #youHaveABigBrother
  1372.     pCurLargePicName = largePicName
  1373.   else
  1374.     pCurLargePicName = ""
  1375.     sendAllSprites #youAreAnOnlyChild
  1376.   end if
  1377.   
  1378.   getBasicPicture oASsetHQ, newPicture
  1379.   sprite(pPictureSprite).locV     = getBasicPicV(me, member("importPictureBasic","database"))  
  1380. end
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387. on showProps me
  1388.   showProps oHQ, me
  1389. end
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.