Change Rgb color PANEL, HELP pls

hi,

you can create a panel that changes color to an object like this example?

thanks a lot!

ex: http://megaswf.com/serve/1992145

thx! :slight_smile: [import]uid: 118312 topic_id: 20862 reply_id: 320862[/import]

Hi use the widget library (slider)

and the following code will do what you want (use the below function as your callback for your sliders, give each slider an id also)

[code]
local r,g,b = 0, 0, 0

– event listener for slider color widgets
local function sliderControl(event)

local id = event.target.id

if id == “r” then
r = (event.target.value * 255) / 100
elseif id == “g” then
g = (event.target.value * 255) / 100
elseif id == “b” then
b = (event.target.value * 255) / 100
end

myObject:setFillColor(r, g, b)
end
[/code] [import]uid: 84637 topic_id: 20862 reply_id: 82306[/import]

1 Like