Spinning object animation

Ken Corey ken at kencorey.com
Sun Mar 4 06:13:11 EST 2012


The frames of the vase are in the opposite order of the globe. 
Rearrange the frames in the opposite order (I did it in GIMP in < 1 
minute).  For the vase, frame 2 becomes frame 12, frame 3 becomes 11, 
4->10, 5->9, 6->8.  It's just swapping the two frames.

Also, the movement felt wrong to me.  If you started moving towards the 
right, but now are moving back towards the left, shouldn't the item you 
appear to have grabbed also be moving towards the left?  Something like 
this:

on mouseMove x,y
    if tMouse = 1  then
       put trunc((tLoc-x)/5) into tDiff

       put (tImageFrame + tDiff) mod (the framecount of img 1) \
	into tCFrame

       if tCFrame<0 then
          add the framecount of img 1 to tCFrame
       end if
       set the currentframe of img 1 to tCFrame
    end if
end mouseMove

-Ken




More information about the use-livecode mailing list