Rev Graphics Gurus

Wilhelm Sanke sanke at
Thu Oct 19 05:59:04 EDT 2006

On Wed Oct 18, Richmond Mathewson geradamas at wrote:

> Have uploaded "COLOUR VALUES 2" to My Space:
> this lets one play around with a set of RGB slides and
> see the effect upon a control . . .
> However, if any of the colours of the control are the
> default (empty) the whole thing goes wrong
> AND, still do not quite understand why this will not
> work with imported images
> sincerely, Richmond Mathewson

Hi Richmond,

I took a look at your stack.
As always, things could be somewhat simplified. Here is an alternative 
3-line script for your color scrollbars.

First set the start value to 0 and the end value to 255 (your value here 
is 510 ?)
Set "show values" to true.

"on scrollbardrag x
  put the backcolor of fld "example" into tcolor
    put x into item 1 of tcolor # the R value
  set the backcolor of fld "example" to tcolor
end scrollbardrag"

Modify the script for the other two Green and Blue scrollbars -> item 2 
of tcolor, item 3 of tcolor.

No need for hidden fields to store intermediate variables etc..

I have used as similar approach in an older stack "Farbspiele" ("Play 
with colors") intended to introduce students to color concepts. You find 
such scrollbars on card "Oberflächenkosmetik 1" ("surface cosmetics").

<> --

Imported images unfortunately cannot be modified this way, you have to 
manipulate the imagedata.

There are many examples for handling imagedata in the stacks below  - 
which I already mentioned in my last post of this thread:





Wilhelm Sanke

More information about the use-livecode mailing list