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

  1. on mouseDown
  2.   global movieDuration, therange, bndLt, bndRt
  3.   puppetSprite(12, 1)
  4.   set the immediate of sprite 12 to 1
  5.   set dx to the locH of sprite 12 - the mouseH
  6.   updateStage()
  7.   repeat while the mouseDown
  8.     set theLocH to the mouseH + dx
  9.     if (theLocH >= bndLt) and (theLocH <= bndRt) then
  10.       set the locH of sprite 12 to theLocH
  11.     else
  12.       if theLocH > bndRt then
  13.         set the locH of sprite 12 to bndRt
  14.       else
  15.         if theLocH < bndLt then
  16.           set the locH of sprite 12 to bndLt
  17.         end if
  18.       end if
  19.     end if
  20.     updateStage()
  21.   end repeat
  22.   set theMovieTime to integer(movieDuration * (the locH of sprite 12 - bndLt) / therange * 1.0)
  23.   if theMovieTime >= movieDuration then
  24.     puppetSprite(8, 0)
  25.     updateStage()
  26.     go(marker(0) + 11)
  27.   else
  28.     set thePos to the frame - marker(0)
  29.     if (thePos < 7) or (thePos > 10) then
  30.       go(marker(0) + 7)
  31.     end if
  32.     puppetSprite(8, 1)
  33.     set the movieTime of sprite 8 to theMovieTime
  34.     set the movieRate of sprite 8 to 1
  35.     set the castNum of sprite 11 to 448
  36.   end if
  37. end
  38.