Setting the blendLevel of BGColor with no color...???

Scott Rossi scott at tactilemedia.com
Fri Jan 29 20:04:15 EST 2010


John, maybe you could describe a bit more what you're trying to accomplish.

If you're just trying to change the blendlevel of a bunch of graphics using
a scrollbar, this is one way (using a scrollbar whose startValue = 0 and
endValue = 100):

on scrollbarDrag N
   lock screen
   repeat with G = 1 to number of grcs of grp "grid"
      set blendLevel of grc G of grp "grid" to N
   end repeat
   unlock screen
end scrollbarDrag

Note that setting the backgroundColor of something to empty means it will
inherit the backgroundColor of the card (which in turn will inherit the
backgroundColor of the stack if the card has no color assigned).

Please provide some more details if you're trying to do something else.

Best Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, John Patten wrote:

> 
> Hi All...
> 
> I'm guessing you shouldn't be able to do this:
> 
>     on MouseDown
>        if the backgroundcolor of me is "" then
>        set the backgroundcolor of me to "blue"
> set the ink of me to blend
> set the blendLevel of me to 50
> else
>     set the backgroundcolor of me to ""
>     set the ink of me to blend
>     set the blendLevel of me to 100
>     end if
> end mouseDown
> 
> This works fine with a series of rectangle graphics. Setting the
> backgroundColor to "" results in a transparent rectangle but still
> containing an Opaque qualities. (However still couldn't get them to
> change while mouse down and dragging...but I digress...)
> 
> However, when you try to control the blendlevel of colored rectangles
> with a scrollbar the rectangles with their backgroundColor set to ""
> turn white. I was hoping I could still preserve the transparency and
> keep the rectangle grcs opaque. (I need to the user to be able click
> on them to either colorize or remove color with a click.)
> 
> Here's my scrollbar:
> 
> on mouseStillDown
>     put the number of grcs of group "grid" - 1 into ModTransparency
>     put 1 into X
>     repeat ModTransparency
>        set the blendLevel of grc ("rectangle"&X) to ThumbPosition of me
>        add 1 to X
>     end repeat
>     put the thumbPosition of me
> end mouseStillDown
> 
> 
> Is setting the bgcolor of a grc to "" not really something that is
> supposed to result in a transparent grc with an opaque setting of true?
> 
> Thanks!
> 
> John Patten
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 







More information about the use-livecode mailing list