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"
<[email protected] on behalf of [email protected]>
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"
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode