Moving controls smoothly around the screen

Apps Foundry appsfoundry67 at gmail.com
Sun Apr 14 14:39:23 EDT 2013


Pete:

Perhaps I'm missing a key detail of how you want to move things around, but
I can make a group of buttons move smoothly using:
*
*
*on mouseUp*
*    put the loc of group "btns" into theLoc*
*    add 100 to item 2 of theLoc*
*    move group  "btns" to theLoc in 500 milliseconds*
*end mouseUp*

This assumes that the buttons are grouped, which assumes in turn that you
want to achieve this:

newly-visible group
btn1
btn2
btn3

not this:

btn1
newly-visible group associated with btn1
btn2
btn3

It also ignores the exact timing between the move and the "show group ...
with visual effect".

Ok, couldn't resist pushing it one step further to get decent timing:

on mouseUp
   put the loc of group "btns" into theLoc
   add 100 to item 2 of theLoc
   move group  "btns" to theLoc in 300 milliseconds
   show group "grp" with visual effect dissolve very fast
end mouseUp

Am I utterly missing what you're trying to achieve?

Larry Walker



More information about the use-livecode mailing list