Scripting Graphic Effects
Sarah Reichelt
sarah.reichelt at gmail.com
Thu Feb 25 01:39:11 EST 2010
> I am confused with respect to scripting graphic effects. In the property
> inspector, they can be boolean (you check them or you don't; once checked,
> you can set other attributes, or not), but the docs present it in terms of
> an array.
>
> What I would like to do is set the colorOverlay to a color value on
> mouseEnter and then TURN THE WHOLE THING OFF on mouseLeave.
>
> Seemingly you cannot set it to false... would the answer be changing the HSV
> value? What is the color value of no color overlay? 0 saturation? Hmmm...
> no, that didn't seem to work. Am clueless!
Each of the graphic effects has an array containing all it's settings.
Each of these arrays has a "color" element which can be used to turn
the effect on or off. The other elements vary according to which
graphic effect you are using, but none of them will have any effect
without a color. So to do what you had on mind, try this script:
on mouseEnter
set the colorOverlay["color"] of me to "red"
end mouseEnter
on mouseLeave
set the colorOverlay of me to empty
end mouseLeave
Cheers,
Sarah
More information about the use-livecode
mailing list