I know I should already know this, but I can't seem to get it to work well.

Below is a behavior that lets you grab a sprite, move it, and release 
it. Then it is supposed to slide back into place in a number of moves.

My problem is that the sprite moves too fast to see it slide back 
into its original place.

Any insights appreciated.

Leif

--code that follows is test code
--all unimportant code has been removed
property pOriginLoc, pCurrentLoc

on beginSprite me
   pOriginLoc = sprite(me.spriteNum).loc
end beginSprite me

on mouseDown me
--the following code is for moving a text cast member
--as text members have a regPoint of (0,0)
   sprite(me.spriteNum).loc = the mouseLoc - 
point(sprite(me.spriteNum).width/2, sprite(me.spriteNum).height/2)
   updateStage
   repeat while the stillDown
     sprite(me.spriteNum).loc = the mouseLoc - 
point(sprite(me.spriteNum).width/2, sprite(me.spriteNum).height/2)
     updateStage
   end repeat
end mouseDown me

on mouseUp me

   pCurrentLoc = sprite(me.spriteNum).loc
   repeat with i = 2 to 9
     sprite(me.spriteNum).loc = pCurrentLoc + ((pOriginLoc - 
pCurrentLoc)/10) * i
     updateStage
   end repeat

   sprite(me.spriteNum).loc = pOriginLoc

end mouseUp me


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to