I’m creating the following in my storyboard createscene method
[lua] – Create the text for the distance score running in the top left corner
local distanceString = string.format("%s: %i", “Distance”, myGlobal.distance)
local myDistance = display.newText(distanceString, 0.05 * _W + _originX, -100, “myfont”, fontSize)[/lua]
and then in my game loop I am updating it via the text property
[lua]myGlobal.distance = myGlobal.distance + 1
local distanceString = string.format("%s: %i", “Distance”, myGlobal.distance)
myDistance.text = distanceString [/lua]
With the reference point being a default of top left what I don’t understand is why the text is jumping around. If I remove and recreate the text each time and position at the same point it doesn’t jump.
Nothing seems documented about the text method update but clearly I am missing something obvious.
Can you advise please
J [import]uid: 103970 topic_id: 24524 reply_id: 324524[/import]