Hi guys
I have the following piece of code:
local i
local j
for i=1, #objects do
j = 0 + i
objects[i] = display.newImageRect(objects[i], 50, 100)
objects[i]:setReferencePoint(display.TopLeftReferencePoint)
objects[i].x = 50 \* j
objects[i].y = 0
localGroup:insert(objects[i])
end
Which is great if the height is fixed, however the objects all vary in heights.
I am trying to use:
objects[i].contentHeight
and even:
local objHeight = objects[i].contentHeight
objects[i] = display.newImageRect(objects[i], 50, objHeight)
but even that doesn’t work.
Any chance someone could take a look at this?
Thanks!
[import]uid: 40538 topic_id: 13553 reply_id: 313553[/import]