setFillColor inside a function

Hi, im having some problems with this function. This is what i have:
[lua]local image = display.newImage(“image.png”)
image.x = 100
image.y = 100
local button = display.newImage(“button.png”)
button.x = 200
button.y = 320

local function colorNext (event)
image:setFillColor(100,25,100)
end
button:addEventListener(“touch”,colorNext)[/lua]
Pretty basic, but its not working, if I put a newText, it works whenever i press the button, or if i use setFillColor outside the function, it works. Even if i dont apply an addEventListener, and then i call the function, it works.
Is there something im doing wrong? Or its just a bug? [import]uid: 108461 topic_id: 20790 reply_id: 320790[/import]

Hey there,

This sounds like a bug - could you please submit a report using the link in the top right?

Peach [import]uid: 52491 topic_id: 20790 reply_id: 81822[/import]

While they look at that, you might try something like this (untested)

local function colorNext (event) event.target:setFillColor(100,25,100) end [import]uid: 108660 topic_id: 20790 reply_id: 81856[/import]

I just found something weird. If I press the button nothing happens, but when i alt+tab corona and open it again, the color changes. I’ll submit the bug, hopefully it works on the device, i’ll try later.
EDIT: sadly, it doesn’t work on the device. Submited the ticket already. [import]uid: 108461 topic_id: 20790 reply_id: 81859[/import]

how bout this one?

[code]

local function wrap ()
image:setFillColor(100,25,100)
end
local function colorNext (event)
wrap ()
end

Thanks for the help but it didn’t work, its just bugged. I’ll wait for an answer. [import]uid: 108461 topic_id: 20790 reply_id: 81934[/import]

Well, ive found a workaround, its posted here:
http://developer.anscamobile.com/forum/2011/12/06/question-about-setfillcolor-images

[lua]image:translate(1,0)
image:translate(-1,0)[/lua]

should do the trick. Its nice to see it working, but im not really happy using extra animation. It seems that since build 702 this is bugged.
EDIT: with the translate trick, after the installation was complete on my phone, the device said it was corrupted.
I tried the normal way with another game and it worked fine, same build, same everything, really weird. [import]uid: 108461 topic_id: 20790 reply_id: 82043[/import]