home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 July / CHIP_CD_1997_07_PL.iso / knowhow / internet / media / files / nmain.dir / 00006.ls < prev    next >
Encoding:
Text File  |  1997-03-24  |  1.4 KB  |  45 lines

  1. on mainEvents
  2.   pause()
  3.   if the colorDepth > 1 then
  4.     set the colorDepth to 1
  5.   end if
  6.   set the immediate of sprite 3 to 1
  7.   when mouseDown then mouseHandler
  8. end
  9.  
  10. on mouseHandler
  11.   if (the mouseH > (the width of sprite 2 + the left of sprite 2)) or (the mouseV > (the top of sprite 2 + 20)) then
  12.     exit
  13.   end if
  14.   if (the mouseH >= the left of sprite 3) and (the mouseH <= the right of sprite 3) and ((the mouseV >= the top of sprite 3) and (the mouseV <= the bottom of sprite 3)) then
  15.     exit
  16.   end if
  17.   set h to the mouseH
  18.   set os2h to h - the locH of sprite 2
  19.   set os3h to h - the locH of sprite 3
  20.   set os4h to h - the locH of sprite 4
  21.   set os5h to h - the locH of sprite 5
  22.   set os6h to h - the locH of sprite 6
  23.   set v to the mouseV
  24.   set os2v to v - the locV of sprite 2
  25.   set os3v to v - the locV of sprite 3
  26.   set os4v to v - the locV of sprite 4
  27.   set os5v to v - the locV of sprite 5
  28.   set os6v to v - the locV of sprite 6
  29.   repeat while the stillDown
  30.     set h to the mouseH
  31.     set v to the mouseV
  32.     set the locH of sprite 2 to h - os2h
  33.     set the locV of sprite 2 to v - os2v
  34.     set the locH of sprite 3 to h - os3h
  35.     set the locV of sprite 3 to v - os3v
  36.     set the locH of sprite 4 to h - os4h
  37.     set the locV of sprite 4 to v - os4v
  38.     set the locH of sprite 5 to h - os5h
  39.     set the locV of sprite 5 to v - os5v
  40.     set the locH of sprite 6 to h - os6h
  41.     set the locV of sprite 6 to v - os6v
  42.     updateStage()
  43.   end repeat
  44. end
  45.