Alpha Channel?

Chipp Walters chipp at chipp.com
Wed Jun 9 16:51:58 EDT 2004


Hi Marty,

You certainly can use PNG's with an alpha channel in RR with no problem. 
While you can't shift-drag to constrain, you can write a simple handler 
to resize an image proportionally...or even easier is

create a button and name it "Proportionally Fit the Height to the 
Current Width" (I know kinda long, but that's what it does;-)

Then put the following script into the button:

on mouseUp
   put the formattedWidth of img "myImage" into tFW
   put the formattedHeight of img "myImage" into tFH
   put the width of img "myImage" into tW
   set the height of img "myImage" to tW/tFW*tFH
end mouseUp


Next resize image "myImage" to roughly the size you want and then press 
the button. It will automatically set the height based upon the width 
proportionally.

Don't forget to

set the lockLoc of img "myImage" to true

when you're done so it won't 'revert back to it's original size' on 
openCard.

best,

Chipp

Marty Knapp wrote:

> I have an Apple Keynote presentation that I'm thinking of recreating in
> Revolution so that I can customize the slide-to-slide timing and do a few
> other things that keynote can't do. Can Revolution recognize a graphic image
> that has an alpha mask-- to make part of an image transparent? If so, then I
> could mimic the cutouts in Keynote.
> 
> Also, when you place a graphic image in Revolution is there a way to
> constrain the proportions as you size the image?



More information about the use-livecode mailing list