using this code
first run in loop
the first print statement – 1 0
second print statement – img 1 0
second time thru loop
the first print statement – 2 480
second print statement – img 2 480
loop ends
the last print statement – 480 480
cant figure out how the images y value get set to 0 & 480
but then after setting them they both get changed to 480
local function arrangeImgUsing() if firstRun == true then for a = 1, 2 do if self.dir == "up" then self.imgUsing[a].anchorX = 0.5 self.imgUsing[a].anchorY = 1 self.imgUsing[a].x = display.contentCenterX -- make sure math correct print( a,((a-1)\*self.imgUsing[a].height)) self.imgUsing[a].y = ((a-1)\*(self.imgUsing[a].height)) -- make sure y correct print("img "..a,self.imgUsing[a].y) end end firstRun = false end end -- double ck y print(self.imgUsing[1].y, self.imgUsing[2].y)