At 8:26 AM -0400 05/17/01, Lingo-L Digest wrote:
>Is there a way to change the color of a palette by palette index?  In other
>words, I want to have a map of the 50 states.  Each state has its own color
>& palette index (even though they will all have the same RGB values)  So, I
>would want to click on a state, determine it's palette index, and then
>change the color within the palette (say its index is 20, I would want to
>change the color in the index position 20 to red from green)
>
>Does this make sense?  I can't seem to control colors within a palette using
>lingo!

Your approach is not the best way to change the color of an object. The
easiest thing would be to have 50 separate sprites, one for each state,
instead of trying to determine which state was clicked by virtue of the
color of the pixel under the cursor.

Once the sprite is clicked, you can change its color in many ways, such as
by changing its ink effect or setting a custom color for the sprite.

If you stick with one monolithic sprite (which I discourage), you might
want to check into the Precision Xtra from Penworks. It might help
determine what item was clicked.

FWIW, there are some old Xtras that may alter palettes, but I wouldn't
recommend that route. MediaLab, the makers of Photocaster, once had a Color
Genie Xobject that performed palette manipulations. I don't think they ever
created an Xtra.

There is also a gamma Xtra as a I recall that might alter palettes.

There was also an Xtra circa Director 5 called something like lizardtech or
planet something that optimized palettes. I don't know if it was ever
updated for later releases of Director or if it can change palettes on the
fly.

Bruce



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to