home *** CD-ROM | disk | FTP | other *** search
/ Creative Review 39 / Creative-Review-CD-ROM-39.iso / pc / pres / cr.dir / 00022_Script_22 < prev    next >
Text File  |  1998-07-10  |  885b  |  26 lines

  1. on moveit
  2.   
  3.   set divilist = [#40:20,#41:-20,#42:20,#43:-20,#44:12,#45:-12,#46:-15,#47:15,#48:17,#49:-19,#50:20,#51:-20]
  4.   repeat with a = 40 to 51
  5.     
  6.     set divide = getProp(divilist, a)
  7.     
  8.     set Hmove = ((the mouseh - ((the left of sprite 13 + the right of sprite 13)/2))/ divide)
  9.     set Vmove = ((the mouseV - ((the bottom of sprite 13 + the top of sprite 13)/2))/ divide)
  10.     
  11.     
  12.     set the loch of sprite a to the loch of sprite a + Hmove
  13.     set the locV of sprite a to the locV of sprite a + Vmove
  14.     
  15.     if the loch of sprite a > 660 then 
  16.       set the loch of sprite a to 257
  17.     else if the loch of sprite a < 257 then set the locH of sprite a to 660
  18.     
  19.     
  20.     if the top of sprite a > 310 then
  21.       set the locV of sprite a to -40
  22.     else if the locV of sprite a < -40 then set the locV of sprite a to 310
  23.     
  24.   end repeat
  25. end
  26.