moving and scaling an image
David Glasgow
david at dvglasgow.wanadoo.co.uk
Fri Feb 10 11:02:58 EST 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:
on embiggen
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
end repeat
move me to item 1 of the loc of me & "," & tend
end embiggen
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.
Ha!
Thanks again,
David Glasgow
More information about the use-livecode
mailing list