home *** CD-ROM | disk | FTP | other *** search
/ The Princeton Review - Science Smart / SCIENCE.iso / pc / science / files / cad.dir / 04288.ls < prev    next >
Encoding:
Text File  |  1996-01-26  |  3.9 KB  |  142 lines

  1. on test
  2.   global gsectlist, gsublist, gindex, gindexoffset, gsubsublist
  3.   repeat with in1 = 8 to 8
  4.     set gsectlist to in1
  5.     set num to in1
  6.     slidesect()
  7.     updateStage()
  8.     set tprob to gsectlist mod 2
  9.     if tprob = 1 then
  10.       set lupref to "i" & line num of the text of field 1
  11.     else
  12.       set lupref to "p" & line num of the text of field 1
  13.     end if
  14.     put the text of cast lupref into field 2
  15.     set gsublist to 1
  16.     slidesub()
  17.     updateStage()
  18.     put " " into field 3
  19.     if in1 = 6 then
  20.       set sint to 11
  21.     else
  22.       set sint to 1
  23.     end if
  24.     repeat with in2 = sint to the number of lines in field "sublist"
  25.       set gsublist to in2
  26.       set num to in2
  27.       set the foreColor of field 3 to 255
  28.       updateStage()
  29.       slidesub()
  30.       updateStage()
  31.       set tprob to gsectlist mod 2
  32.       if tprob = 1 then
  33.         set lupref to "i" & line num of the text of field 2
  34.       else
  35.         set lupref to "p" & line num of the text of field 2
  36.       end if
  37.       put the text of cast lupref into field 3
  38.       repeat with in3 = 1 to the number of lines in field "subsublist"
  39.         set num to in3
  40.         if line num of the text of field 3 = EMPTY then
  41.           exit
  42.         end if
  43.         set tprob to gsectlist mod 2
  44.         set the foreColor of field 3 to 255
  45.         set the foreColor of line num of field 3 to 215
  46.         if tprob = 1 then
  47.           set frameref to line num of the text of field 3 & " (1)"
  48.           set the visible of sprite 42 to 1
  49.         else
  50.           set frameref to line num of the text of field 3 & " (P1)"
  51.           set the visible of sprite 42 to 0
  52.         end if
  53.         set frameref to frametonum(frameref)
  54.         puppetSprite(11, 0)
  55.         puppetSprite(12, 0)
  56.         go(frameref)
  57.         puppetSprite(43, 0)
  58.         sresp(47)
  59.         setoff(1)
  60.         set the visible of sprite 42 to 0
  61.         setindex()
  62.         go(1)
  63.         slidesect()
  64.         slidesub()
  65.         set the foreColor of line gsubsublist of field 3 to 215
  66.       end repeat
  67.     end repeat
  68.   end repeat
  69. end
  70.  
  71. on test2
  72.   global gplist
  73.   repeat with index = 2 to 843
  74.     go(index)
  75.     setoff(1)
  76.     cunload()
  77.     sresp(39)
  78.     set the visible of sprite 42 to 0
  79.     set thisframe to EMPTY
  80.     set test to line the frame of the text of cast 4136
  81.     if test = EMPTY then
  82.       set thisframe to stripend(numtoframe(the frame))
  83.       set thisframe to frametonum(thisframe & " (P1)")
  84.       if thisframe > 0 then
  85.         go(thisframe)
  86.         sresp(39)
  87.         cunload()
  88.         setoff(1)
  89.         set temp to stripend(numtoframe(the frame))
  90.         set temp to frametonum(temp & " (1)")
  91.         set the visible of sprite 42 to 1
  92.         offbut()
  93.         go(temp)
  94.       else
  95.         put index
  96.       end if
  97.       next repeat
  98.     end if
  99.     if value(test) > 0 then
  100.       go(value(test))
  101.       sresp(39)
  102.       cunload()
  103.       setoff(1)
  104.       set temp to stripend(numtoframe(the frame))
  105.       set temp to frametonum(temp & " (1)")
  106.       set the visible of sprite 42 to 1
  107.       offbut()
  108.       go(temp)
  109.       next repeat
  110.     end if
  111.     put index
  112.   end repeat
  113. end
  114.  
  115. on test3
  116.   repeat with index = 844 to 1630
  117.     go(index)
  118.     set x to the castNum of sprite 21
  119.     if x = 7001 then
  120.       set temp to the rect of sprite 21
  121.       set temp to string(temp)
  122.       put "," into char 5 of temp
  123.       set tx to the number of chars in temp
  124.       put "," into char tx of temp
  125.       if (value(item 2 of temp) < 40) or (value(item 4 of temp) > 604) or (value(item 5 of temp) > 391) then
  126.         put index
  127.       end if
  128.     end if
  129.     set x to the castNum of sprite 22
  130.     if x = 7001 then
  131.       set temp to the rect of sprite 22
  132.       set temp to string(temp)
  133.       put "," into char 5 of temp
  134.       set tx to the number of chars in temp
  135.       put "," into char tx of temp
  136.       if (value(item 2 of temp) < 40) or (value(item 4 of temp) > 604) or (value(item 5 of temp) > 391) then
  137.         put index
  138.       end if
  139.     end if
  140.   end repeat
  141. end
  142.