Resetting a display object

Hi, quick question:

I have a table with 4 items, and a button when you press it, the selected item from the array changes its color (using other 3 tables for r,g,b) with setFillColor API. My problem is, if i want to add an option, like “reset” to get the original display picture, how can i do this? considering im using an array, and corona needs to remember the display object active.

Thanks in advance [import]uid: 108461 topic_id: 25096 reply_id: 325096[/import]

You would need to save the information you need to recall, for sure. But you could always do it like this:

[code]local myTable = {}
myTable[1] = {}
myTable[2] = {}
myTable[3] = {}
myTable[4] = {}

myTable[1].image = display.newImage(“myfile.png”, 0, 10)
myTable[1].initialX = myTable[1].image.x
myTable[1].initialY = myTable[1].image.y[/code]

Something like that. Lots of different approaches though. [import]uid: 41884 topic_id: 25096 reply_id: 101958[/import]

I’ll give it a try.
Thanks [import]uid: 108461 topic_id: 25096 reply_id: 102007[/import]