Access from top value

Hi,
is there any way to access the from top value?

i.e

[lua]local r = display.newRetinaText(“HELLO”,100,100,native.systemFont,15)
–I tried y but returned 150

print(r.y)
–returns 150[/lua]

That is 100px from the top, but the y value is 150 so it cannot be used…
[import]uid: 24641 topic_id: 21935 reply_id: 321935[/import]

[lua]local r = display.newRetinaText(“HELLO”,100,100,native.systemFont,15)

r:setReferencePoint(display.TopCenterReferencePoint);
–I tried y but returned 150

print(r.y)
–returns 150[/lua]

http://developer.anscamobile.com/reference/index/objectsetreferencepoint [import]uid: 10389 topic_id: 21935 reply_id: 87189[/import]

Changing the reference point is one way, the other, assuming you want to keep the center reference point is:

[code]
local r = display.newRetinaText(“HELLO”,100,100,native.systemFont,15)
–I tried y but returned 150

print(r.y - r.contentHeight / 2)
[/code] [import]uid: 19626 topic_id: 21935 reply_id: 87286[/import]

Thanks, got it sorted [import]uid: 24641 topic_id: 21935 reply_id: 87302[/import]