home *** CD-ROM | disk | FTP | other *** search
/ Inventor Labs: Technology / INVENTORLABS_TECHNOLOGY.BIN / pc / files / gears.dir / 00227_Script_227 < prev    next >
Text File  |  1997-05-26  |  3KB  |  90 lines

  1.  
  2.  
  3. global gInstructText,gDescriptionText, gorigcast, gDiplaycast, gOrigHilite, gActiveText, gDisplayFieldLines
  4. global gNumOfInstructLns, gNumOfDescriptLns, gInstructionsUP, gTopDiplayLn, gTotalLine
  5. global gScrollDwnCast
  6. --------------------------------------------------------------------------------------------------------
  7. on scrollup
  8.   
  9.   set the castnum of sprite 28 = gScrollDwnCast + 1
  10.   updatestage
  11.   repeat while the mousedown
  12.     
  13.     if (gTopDiplayLn > 1) then 
  14.       set gTopDiplayLn = gTopDiplayLn - 1
  15.       set the text of cast gDiplaycast = line gTopDiplayLn to (gTopDiplayLn + gDisplayFieldLines) of gActiveText
  16.     end if
  17.     
  18.   end repeat
  19.   set the castnum of sprite 28 = 0
  20.   updatestage
  21.   
  22. end scrollup
  23. --------------------------------------------------------------------------------------------------------
  24. on scrolldown
  25.   
  26.   set the castnum of sprite 30 = gScrollDwnCast
  27.   updatestage
  28.   repeat while the mousedown
  29.     
  30.     if ((gTopDiplayLn + gDisplayFieldLines) <= gTotalLine) then 
  31.       set gTopDiplayLn = gTopDiplayLn + 1
  32.       set the text of cast gDiplaycast = line gTopDiplayLn to (gTopDiplayLn + gDisplayFieldLines) of gActiveText
  33.     end if
  34.     
  35.   end repeat
  36.   set the castnum of sprite 30 = 0
  37.   updatestage
  38.   
  39. end scrolldown
  40. --------------------------------------------------------------------------------------------------------
  41. on InstructionToggle
  42.   
  43.   if the mousev > 418 then
  44.     
  45.     set the text of cast gDiplaycast = gDescriptionText
  46.     puppetsprite 33, true
  47.     set the castnum of sprite 33 = gOrigHilite + 1
  48.     puppetsprite 26, true
  49.     set the castnum of sprite 26 = 0
  50.     set gTotalLine = gNumOfDescriptLns
  51.     set gActiveText = gDescriptionText
  52.     
  53.   else 
  54.     
  55.     set the text of cast gDiplaycast = gInstructText
  56.     puppetsprite 33, false
  57.     puppetsprite 26, false
  58.     set gTotalLine = gNumOfInstructLns
  59.     set gActiveText = gInstructText
  60.     
  61.   end if
  62.   
  63.   set gTopDiplayLn = 1
  64.   updatestage
  65.   
  66. end InstructionToggle
  67. --------------------------------------------------------------------------------------------------------
  68.  
  69.  
  70. on setuptext
  71.   
  72.   set gTopDiplayLn = 1
  73.   set gDisplayFieldLines = 30
  74.   set gScrollDwnCast = the number of cast "SCROLL BUTTON DOWN"
  75.   set gDiplaycast = the number of cast "DisplayText"
  76.   set gorigcast = the castnum of sprite 26
  77.   set gOrigHilite = the castnum of sprite 33
  78.   
  79.   set gInstructText =  the text of cast gorigcast
  80.   set gNumOfInstructLns = the number of lines of gInstructText
  81.   
  82.   set gDescriptionText =  the text of cast (gorigcast + 1)
  83.   set gNumOfDescriptLns = the number of lines of gDescriptionText
  84.   
  85.   set the text of cast gDiplaycast = gInstructText
  86.   set gTotalLine = gNumOfInstructLns
  87.   set gActiveText = gInstructText
  88.   
  89. end setuptext
  90. --------------------------------------------------------------------------------------------------------