Notifications
Clear all
[Closed] color will not change ?
Sep 24, 2007 11:52 pm
can someone tell me why my script is not working ? . pressing the button should turn the bitmap to green but its not working . thanks for reading
(
local col = [0,0,0] as color
group "test"(
bitmap testmap bitmap:(bitmap 15 10 color:col) pos:[10,25]
button doit "Do it" width:70 pos:[40,27]
) -- group end
on doit pressed do (
col = [0,255,0] as color -- change colour to green
------------------------
)
2 Replies
Sep 24, 2007 11:52 pm
You are setting the col variable to green, but not changing the bitmap colour value to green.
rollout letstrythatagain "Whee!" width:162 height:300
(
local col = [0,0,0] as color
group "test"
(
bitmap testmap bitmap:(bitmap 15 10 color:col) pos:[10,25]
button doit "Do it" width:70 pos:[40,27]
) -- group end
on doit pressed do
(
col = [0,255,0] as color
testmap.bitmap = (bitmap 15 10 color:col)-- change colour to green
)
)
createdialog letstrythatagain
You could do this a variety of ways, but that’s a quick method.