Basically I have two tables one for the “words” and other for the “imgbtn”.
I have placed 4 images in display and now I want those images to move around using touch how can i do it ?coz the one that i am doing is not working?please help me out I need it desperately.pleasee…
[lua]local function match( event)
if(event.phase == “began”) then
imgbtn[count].x=event.x
imgbtn[count].y=event.y
end
end
for count = 1,2 do
x = x + 250
y = 0
for insideCount = 1,2 do
y = y + 250
totalButtons = totalButtons + 1
temp = math.random(1,#words)
imgbtn[count] = display.newImage(words[temp] … “.jpg”);
imgbtn[count].x = x
imgbtn[count].y = y
imgbtn[count].myName = words[temp]
imgbtn[count].number = totalButtons
table.remove(words, temp)
imgbtn[count]:addEventListener( “touch”, match)
end
end[/lua] [import]uid: 82446 topic_id: 18201 reply_id: 318201[/import]

[import]uid: 52491 topic_id: 18201 reply_id: 69647[/import]