Turn "outer glow" On and Off? - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Turn "outer glow" On and Off? - Solved
// LiveCode 9.0.5-rc-1
set the outerglow of grc "Oval_3_1" to true
set the outerglow of grc "Oval_3_1" to false
Why does the above code NOT control the "outerGlow" of grc?
Thanks,
David
set the outerglow of grc "Oval_3_1" to true
set the outerglow of grc "Oval_3_1" to false
Why does the above code NOT control the "outerGlow" of grc?
Thanks,
David
Last edited by DR White on Tue Jun 04, 2019 12:53 pm, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Turn "outer glow" On and Off?
Because 'outerglow' is far more complicated than that:
- -
Button 'ON':
Button 'OFF':
- -
Button 'ON':
Code: Select all
on mouseUp
set the outerglow["color"] of grc "Oval_3_1" to "0,0,0"
set the outerglow["opacity"] of grc "Oval_3_1" to "255"
set the outerglow["blendMode"] of grc "Oval_3_1" to "normal"
set the outerglow["filter"] of grc "Oval_3_1" to "gaussian"
set the outerglow["size"] of grc "Oval_3_1" to "50"
set the outerglow["spread"] of grc "Oval_3_1" to "50"
end mouseUp
Code: Select all
on mouseUp
set the outerglow of grc "Oval_3_1" to false
end mouseUp
- Attachments
-
- glow.livecode.zip
- Here's the stack.
- (1.04 KiB) Downloaded 135 times
Re: Turn "outer glow" On and Off?
richmond62,
I try not to ask for help until after I have done some research myself first.
When I searched "outerglow" I found some older comments such as you have described, but I thought that maybe, the later versions of LC had simplify the process.
Thanks for your explanation,
David
I try not to ask for help until after I have done some research myself first.
When I searched "outerglow" I found some older comments such as you have described, but I thought that maybe, the later versions of LC had simplify the process.
Thanks for your explanation,
David
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Turn "outer glow" On and Off? - Solved
Remark.
Because the outerglow property is an array the following is equivalent to switch it OFF:
set the outerglow of grc "Oval_3_1" to false
set the outerglow of grc "Oval_3_1" to true
set the outerglow of grc "Oval_3_1" to empty
In the first two cases the engine inserts empty because false and true are invalid values for the (array) property outerglow.
Because the outerglow property is an array the following is equivalent to switch it OFF:
set the outerglow of grc "Oval_3_1" to false
set the outerglow of grc "Oval_3_1" to true
set the outerglow of grc "Oval_3_1" to empty
In the first two cases the engine inserts empty because false and true are invalid values for the (array) property outerglow.
shiftLock happens
-
- Livecode Opensource Backer
- Posts: 9386
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Turn "outer glow" On and Off? - Solved
That sounds all very jolly, but 'outerglow', being complicated insofar as it has 5 parametersthe later versions of LC had simplify the process
is probably not capable of being simplified.
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Turn "outer glow" On and Off? - Solved
Certainly "simplifying" makes sense in that "turning on" as from the property inspector could set default values (or the latest used values) for the array elements.
But that does nothing else than setting array elements as Richmond did in his "ON"-script above.
That is, we have to do that by ourselves when scripting/ not doing from the property inspector.
But that does nothing else than setting array elements as Richmond did in his "ON"-script above.
That is, we have to do that by ourselves when scripting/ not doing from the property inspector.
shiftLock happens
Re: Turn "outer glow" On and Off? - Solved
Don't get me wrong.
I think that LC is the best software on the planet for quickly and easily creating simple to complex apps on ANY platform!! Thats coming from an old "Visual Basic" enthusiast (young people probably never heard of it - LOL).
I just wanted to be sure that I was not over looking the simplest way of doing something.
I think that LC is the best software on the planet for quickly and easily creating simple to complex apps on ANY platform!! Thats coming from an old "Visual Basic" enthusiast (young people probably never heard of it - LOL).
I just wanted to be sure that I was not over looking the simplest way of doing something.