home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 August / macformat-053.iso / mac / Demos / Acacia Educational Multimedia / RESULTS.Dxr / 00007.ls < prev    next >
Encoding:
Text File  |  1997-04-15  |  726 b   |  20 lines

  1. on startMovie
  2.   global gTotalDone, gTotalRight, gTotal2nd, gAvgAns, gAvgRev, gQuitDown, gMyPerc
  3.   set gQuitDown to 0
  4.   put string(gTotalDone) into field "total"
  5.   put string(gTotalRight) into field "right"
  6.   if gTotalDone = 0 then
  7.     put "0" into field "Perc"
  8.     set gMyPerc to 0
  9.     put "0" into field "Perc2"
  10.   else
  11.     set gMyPerc to integer(100.0 * gTotalRight / gTotalDone)
  12.     put string(gMyPerc) into field "Perc"
  13.     set myperc to integer(100.0 * (gTotalRight + (gTotal2nd * 0.29999999999999999)) / gTotalDone)
  14.     put string(myperc) into field "Perc2"
  15.   end if
  16.   set the floatPrecision to 1
  17.   put string(integer(gAvgAns * 10) / 10.0) into field "Ans"
  18.   put string(integer(gAvgRev * 10) / 10.0) into field "Rev"
  19. end
  20.