is it possible to get the object the event ran on here?
[lua]Icon = {}
Icon.mt = {};
Icon.mt.__index = Icon;
function Icon:new(i)
local this = {}
local icon = display.newImage(“images/icon”…i…".png")
this.img = icon
setmetatable(this, Icon.mt);
return this
end
function Icon:enterFrame(event)
– HOW TO GET icon INSTANCE HERE?
end
for i=1, 20, 1 do
local icon = Icon:new(i)
icon.x=100
print(icon.img)
Runtime:addEventListener(“enterFrame”,icon)
icons[i] = icon
end[/lua]
thanks
j [import]uid: 6645 topic_id: 3831 reply_id: 303831[/import]