Can i insert the same object in to different groups ?
Here is the sample code…
local tmpWords = display.newGroup()
local drawWords = function( word )
local i = 0
local wordGroup = display.newGroup()
for letter in word:gmatch('.') do
i = i + 1
local letterPath = "Images/Letters/" .. letter .. "\_1.png"
letter = display.newImage( letterPath )
letter:scale(0.6,0.6)
letter.x = initX + xOffset \* i
letter.y = initY
tmpWords:insert( letter )
wordGroup:insert( letter )
end
wordGroup:addEventListener( "touch", onTouch )
i = 0
print("tmp::"..tmpWords.numChildren)
end
print(“tmp::”…tmpWords.numChildren) -> prints 0… why ?
Thanks. [import]uid: 14440 topic_id: 8299 reply_id: 308299[/import]