Sending Empty Params, along with a comma delimited value (RGB in this case)
Sannyasin Brahmanathaswami
brahma at hindu.org
Tue Oct 18 13:31:16 EDT 2016
Thanks Ali… I was overthinking this one for sure
this works great:
on mouseUp
put "255,255,0" into pColor2 # bright yellow
send "setfillGradient ,,,pColor2,,," to grc colorMeditationBkgnd
end mouseUp
command setFillGradient pStartPosition,pEndPosition,pColor1, pColor2,pAlpha1,pAlpha2
if pStartPosition is empty then put kDefaultStart into pStartPosition
if pEndPosition is empty then put kDefaultEnd into pEndPosition
if pColor1 is empty then put kPureWhite into pColor1
if pColor2 is empty then put kPureBlack into pColor2
if pAlpha1 is empty then put kDefaultOpacity into pAlpha1
if pAlpha2 is empty then put kDefaultOpacity into pAlpha2
put(pStartPosition & comma & pColor1 & comma & pAlpha1) into tGradientRamp
put cr &(pEndPosition & comma & pColor2 & comma & pAlpha2) after tGradientRamp
set the fillgradient["ramp"] of me to tGradientRamp
end setFillGradient
On 10/17/16, 11:09 PM, "use-livecode on behalf of Ali Lloyd" <use-livecode-bounces at lists.runrev.com on behalf of ali.lloyd at livecode.com> wrote:
Send params are evaluated in the current context, so you can put variable
names in the list and it will work, eg:
local tRGB
put "25,25,25" into tRGB
send "doSomethingWithColor tRGB" to stack "Color Manager"
More information about the use-livecode
mailing list