In my current app I have the players current score at the top of the screen which is updated as the score increases. At the moment it is a standard text object, but I’m trying to use TextCandy to animate it to make it more interesting. The problem I’m having is that the text appears as expected but then disappears about a second later and I can find no reason at all why it is doing this. I have other TextCandy objects being used which work perfectly so I can’t see why this one isn’t.
The textcandy object is initialised thus…
[lua]
local scoreDisplay=display.newGroup()
menuGroup:insert(scoreDisplay)
– score
local myScore=TextCandy.CreateText({
fontName = “menuFont”,
x = _w/2,
y = 150,
text = “000000”,
originX = “CENTER”,
originY = “CENTER”,
textFlow = “CENTER”,
charSpacing = -5
})
scoreDisplay:insert(myScore)
[/lua]
I’ve deleted the animation code for it so that it is just static to see if that makes a difference but it doesn’t, and I’ve even commented out all of the other TextCandy stuff to see if there’s a conflict but the text still disappears.
Help!