home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00569.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  2.4 KB  |  78 lines

  1. on exitFrame
  2.   global movieDuration, therange, bndTp, bndBt, keyHotspots, castData, n, x1, y1, hiliteFlag
  3.   if the movieTime of sprite 8 < movieDuration then
  4.     set theTime to the movieTime of sprite 8
  5.     set dx to integer(0.5 + (therange * theTime / movieDuration))
  6.     set theLocV to bndTp + dx
  7.     set the locV of sprite 12 to theLocV
  8.     updateStage()
  9.   else
  10.     set the locV of sprite 12 to bndBt
  11.     set the castNum of sprite 11 to 596
  12.     puppetSprite(8, 0)
  13.     go(the frame + 2)
  14.   end if
  15.   set x to the mouseH
  16.   set y to the mouseV
  17.   set n to PCinRect(x, y, keyHotspots)
  18.   if n <> EMPTY then
  19.     if (n = 10) and (marker(0) = 1) then
  20.       go(the frame - 1)
  21.       exit
  22.     end if
  23.     if (n = 11) and (marker(0) = marker(line the number of lines in the labelList - 1 of the labelList)) then
  24.       go(the frame - 1)
  25.       exit
  26.     end if
  27.     if the locH of sprite 16 > 1000 then
  28.       set l to line n of keyHotspots
  29.       set x1 to value(item 1 of l)
  30.       set y1 to value(item 2 of l)
  31.       set x2 to value(item 3 of l)
  32.       set y2 to value(item 4 of l)
  33.       set castData to item 6 to the number of items in l of l
  34.       set the castNum of sprite 5 to the number of cast (item 1 of castData && "hilite")
  35.       spriteBox(5, x1, y1, x2, y2)
  36.       set the visible of sprite 5 to 1
  37.     end if
  38.   else
  39.     set the visible of sprite 5 to 0
  40.   end if
  41.   if rollOver(39) and (item 1 of castData <> "searchResults") then
  42.     if the castNum of sprite 39 = the number of cast "index" then
  43.       setUpTextHilite(39)
  44.     end if
  45.     go(the frame)
  46.     exit
  47.   end if
  48.   if hiliteFlag = 1 then
  49.     set the visible of sprite 48 to 0
  50.     set hiliteFlag to 0
  51.   end if
  52.   go(the frame)
  53. end
  54.  
  55. on setUpTextHilite theSpriteNum
  56.   global hiliteFlag, linePtr, displayLines
  57.   puppetSprite(48, 1)
  58.   set the castNum of sprite 48 to 414
  59.   set x to the castNum of sprite theSpriteNum
  60.   set LT to the left of sprite theSpriteNum
  61.   set TP to the top of sprite theSpriteNum
  62.   set wd to the width of sprite theSpriteNum
  63.   set txtHt to the textHeight of field x
  64.   set the visible of sprite 48 to 0
  65.   set the locH of sprite 48 to LT
  66.   set the width of sprite 48 to wd
  67.   set the height of sprite 48 to txtHt + 1
  68.   set vPos to the mouseV
  69.   set linePtr to integer((vPos - TP) / txtHt)
  70.   if (linePtr + 1) > displayLines then
  71.     set the visible of sprite 48 to 0
  72.     exit
  73.   end if
  74.   set the locV of sprite 48 to integer(TP + (linePtr * txtHt))
  75.   set the visible of sprite 48 to 1
  76.   set hiliteFlag to 1
  77. end
  78.