you don't want to add the quotes, they are just the string delimiter...
Rui Dantas
"Justin Olmanson"
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
m> cc:
Sent by: Subject: <lingo-l> setting the
hexadecimal string value of a color
[EMAIL PROTECTED] with a variable
tworks.net
16-07-2002 17:27
Please respond to lingo-l
Greetings All,
I am working on an experiment in colors, it involves displaying different
colors which correspond with a number generated through a calculation which
gets progressively larger. I convert the number into a hexString and save
it
in a variable. I cannot get the color to change, it only reverts back to
the
sprite's original color -black-.
Can you give me some indication of what i am doing wrong?
--sprite 1 is a 1bit black rectangle
-- both of these handlers are in the same script attached to sprite(1)
on mouseDown me
sprite(1).color = rgb("#FF0000") --works fine, turns sprite red
updateStage --pg. 264 Special Ed. Using MM Dir. 8
--author: Gary Rosenzweig
end
on mouseUp me
hexN = "FF0000" --same hex value as above
hexNumWsharp = "#" & hexN --adds sharp
hexWquotes = QUOTE & hexNumWsharp & QUOTE --adds quotes
sprite(1).color = rgb(hexWquotes) --returns the sprite color to black
updateStage --what am I missing?
end
I realize that I could split the 6 digit hex number into three groups of 2
and convert each back into dec numbers, then use the rgb(rr,gg,bb) style to
accomplish the task. I would however like to know why the above code does
not work / what I have missed...
I use the digest form of the list so pardon my belated response to any
posts,
humbly,
Justin
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/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!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/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!]