Windowshape image as mask for second image

Scott Rossi scott at tactilemedia.com
Fri Dec 9 01:51:52 EST 2005


Recently, Sivakatirswami wrote:

> I have this "concept" and I'm not really sure it can be implemented
> in Rev... at least I haven't found a way:
> 
> 1) Establish a border that is like a picture frame, that is feathered
> on the outer edges... and the inside is transparent....
> 
> 2) use this as a windowshape
> 
> 3) next we want to place an image inside this "frame" such that the
> frame serves as a mask to the second image which is underneath...
> then we would want the image underneath to be set to move across very
> slowly... but only appear on the inside of the frame.
> 
> Now, this doesn't work...
> 
> Saving the window frame as PNG with transparency on.. we get a lowly
> frame, and I can see right three the middle to my desktop and also
> the outer edges are feathered. Lovely: caveat: the inside of the
> frame is also completely knocking on the entire interface!

If I understand what you're trying to do, you don't even need a custom
windowshape for this.  You can do this within a single window by using a
transparent PNG for the frame and placing whatever images you want to move
behind the frame in a group (with lockLoc enabled) behind the frame that is
set to the same width as the frame .  Thus when you slide the images back
and forth within the group, they will be masked by the group and visible
within the frame image.  But you will have a solid color (or texture) in the
center of the frame where photos are visible, since this is where the card
shows through the frame.

Make sense?

If you want to animate the mask of an image, it's possible by repeatedly
setting the alphadata of an image to a sequence of PNGs but this will be a
lot of work.

Otherwise, yes, we need more elaborate masking options within Rev.  The
current rectangle provided by groups is too limiting.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com




More information about the use-livecode mailing list