moving and scaling an image
david at dvglasgow.wanadoo.co.uk
Fri Feb 10 10:02:58 CST 2012
Thanks to all the help with this.
I ended up with a script that created sequential moves, with an image scale in between each. I am amazed at how smooth it is. This is the 'pull towards' script:
put item 2 of the loc of grc "near" into tend
put item 2 of the loc of me into tbeginning
repeat with j= tbeginning to tend step 100
get item 1 of the loc of me & "," & j
move me to it in 2 ticks
set the width of me to the width of me *1.05
set the height of me to the width of me *1.05
move me to item 1 of the loc of me & "," & tend
The move after the repeat loop corrects the location overshoot because of the change in graphic size. I had to chuckle, because this kludge actually looks like a nice little 'bounce' a la iOS.
More information about the use-livecode