My function “Match” is not working with director,but it is working fine without director .Is there any other way to call a function when using Director?
[lua]for count = 1,4 do
x = x + 200
y = 20
for insideCount = 1,3 do
y = y + 200
wordcover[totalButtons] = display.newImage(“button.png”);
wordcover[totalButtons].x = x
wordcover[totalButtons].y = y
totalButtons = totalButtons + 1
temp = math.random(1,#words)
imgbtn[count] = display.newImage(words[temp] … “.png”);
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”, imgbtn[count] )
imgbtn[count].touch = match
end
end
function match()
print (“Function is Working”)
end[/lua] [import]uid: 82446 topic_id: 17758 reply_id: 317758[/import]