Fld text vertical alignment - fld animation

Phil Davis davis.phil at comcast.net
Wed May 10 13:15:11 EDT 2006


Hi Bob -

See if this slightly modified version of your script gives you what you 
want:

on mouseEnter
   set the defaultCursor to hand
   put the loc of the target into tLoc
   repeat with i = 1 to 4
     lock screen
     set the textSize of target to (the textSize of target + 1)
     set the height of the target to the formattedHeight of the target
     set the loc of the target to tLoc
     unlock screen
     wait for .02 seconds
   end repeat
   put flushEvents("all") into temp
end mouseEnter

on mouseLeave
   put the loc of the target into tLoc
   repeat with i = 1 to 4
     lock screen
     set the textSize of target to (the textSize of target - 1)
     set the height of the target to the formattedHeight of the target
     set the loc of the target to tLoc
     unlock screen
     wait for .02 seconds
   end repeat
   set the textSize of target to the ATT_defaultSize of target
   set the defaultCursor to arrow
   put flushEvents("all") into temp
end mouseLeave

Best -
Phil Davis



Bob Earp wrote:
> I have a group of flds that I'm using as a menu with a simple animation that grows the size of text when rolled over, and shrinks the size of text (back to the original) when the mouse leaves.  The problem is that the text does not stay vertically aligned in the fld, so the appearance is the text grows down rather than grows centered.
>  
> I can kluge the size of the fld to make it look right, but..........
>  
> Any ideas ??
>  
> Script at the group is:
>  
> on mouseEnter
>  set the defaultCursor to hand
>  repeat with i = 1 to 4
>   set the textSize of target to (the textSize of target + 1)
>   wait for .02 seconds 
>  end repeat
>  put flushEvents("all") into temp
> end mouseEnter
>  
> on mouseLeave
>  repeat with i = 1 to 4
>   set the textSize of target to (the textSize of target - 1) 
>   wait for .02 seconds
>  end repeat
>  set the textSize of target to the ATT_defaultSize of target
>  set the defaultCursor to arrow
>  put flushEvents("all") into temp
> end mouseLeave
>  
>  
> Tnx, Bob...
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/_______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 



More information about the use-livecode mailing list