Turn "outer glow" On and Off? - Solved

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Turn "outer glow" On and Off? - Solved

Post by DR White » Tue Jun 04, 2019 12:08 pm

// 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
Last edited by DR White on Tue Jun 04, 2019 12:53 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9386
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Turn "outer glow" On and Off?

Post by richmond62 » Tue Jun 04, 2019 12:27 pm

Because 'outerglow' is far more complicated than that:
-
glow.png
-
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
Button 'OFF':

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

DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Turn "outer glow" On and Off?

Post by DR White » Tue Jun 04, 2019 12:52 pm

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

[-hh]
VIP Livecode Opensource Backer
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

Post by [-hh] » Tue Jun 04, 2019 1:05 pm

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.
shiftLock happens

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9386
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Turn "outer glow" On and Off? - Solved

Post by richmond62 » Tue Jun 04, 2019 1:12 pm

the later versions of LC had simplify the process
That sounds all very jolly, but 'outerglow', being complicated insofar as it has 5 parameters
is probably not capable of being simplified.

[-hh]
VIP Livecode Opensource Backer
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

Post by [-hh] » Tue Jun 04, 2019 1:26 pm

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.
shiftLock happens

DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: Turn "outer glow" On and Off? - Solved

Post by DR White » Tue Jun 04, 2019 1:42 pm

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.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”