On Jan 25, 2013, at 4:07 PM, Scott Rossi <[email protected]> wrote:
> For Friday, I thought I'd share a small script/setup that's quite handy for > manually resizing/positioning images when you're laying out a stack. > > The Setup: > > 1) Import your image, set its resizeQuality to "good", lock it, group it, > and set the margins of the group to 0. > > 2) Create a button somewhere in the stack (or substack) to serve as a > behavior, name it "Image Box Lib" or similar, and give it this script: > on resizeControl > > put long id of img 1 of me into myImage > > put formattedHeight of myImage/formattedWidth of myImage into thePercent > > set resizeQuality of myImage to "good" -- OPTIONAL > > set rect of myImage to left of me,top of me,right of me,top of me + > round(width of me * thePercent) > > end resizeControl > > > 3) Set the behavior of the group to the long id of the button. > > Now select the image group and drag the right, left, or bottom right/left > corners, and the image should proportionally resize. It should maintain > decent quality, it will maintain its size because it's locked, and even > though it's locked, you can drag-relocate it on the card because it's > contained by an unlocked group. If you need better quality, change the > "good" option to "best", though resizing will occur a bit slower. Nice! That's a quick and simple way to doing what I've been doing for a while now, but with a longer and more convoluted approach. Thanks, Scott! Ken Ray Sons of Thunder Software, Inc. Email: [email protected] Web Site: http://www.sonsothunder.com/ _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
