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

  1. on mouseDown
  2.   global movieDuration, therange, bndTp, bndBt
  3.   puppetSprite(12, 1)
  4.   set the immediate of sprite 12 to 1
  5.   set dx to the locV of sprite 12 - the mouseV
  6.   updateStage()
  7.   repeat while the mouseDown
  8.     set theLocV to the mouseV + dx
  9.     if (theLocV >= bndTp) and (theLocV <= bndBt) then
  10.       set the locV of sprite 12 to theLocV
  11.     else
  12.       if theLocV > bndBt then
  13.         set the locV of sprite 12 to bndBt
  14.       else
  15.         if theLocV < bndTp then
  16.           set the locV of sprite 12 to bndTp
  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 - bndTp) / 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.