How to make a stack transparent but the fields and images on it a different blend level

Scott Rossi scott at tactilemedia.com
Thu Dec 23 22:18:16 EST 2010


Recently, william humphrey wrote:

> But the problem with this is that you can't move this stack around without
> immediately revealing that the transparent rect image is static. Is there
> some way (without keep getting a new rect to put in the background as that
> is too "jerky") to make a stack and it's background transparent but the
> groups or fields on it not transparent?

One way to do this is to create a stack with a custom windowShape that has
the control regions opaque and the unoccupied regions translucent.  It's not
convenient, but it's possible.  I posted a stack some time ago that
dynamically creates the mask image at startup and applies the windowShape to
the stack.  In your message box:

 go url "http://www.tactilemedia.com/site_files/downloads/transtack2.rev"

Keep in mind that this method doesn't automatically work for irregular
shaped objects like sliders, and even checkboxes suffer a bit because the
check extends beyond the rect of the box.  You'll need a compromise like
adding a graphic behind each irregular control whose rect "fits" the entire
region needed to accommodate the control.  It's a bit of work, but with a
little planning, you can indeed create a stack that has opaque controls with
a translucent background.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design






More information about the Use-livecode mailing list