1
votes

Is it possible to create some sort of animation for a label in Corona SDK? I want to make a text appear big then, the position will move after it comes up and shrinks? I don't want to use an image because the text on my label changes. If it is possible, can you please point me to the right direction? Thank you.

2

2 Answers

2
votes

Is this is what you are looking..?

local label = display.newText("Label_1",50,100,nil,20)

local function transition_3()
   label.text = "Label_3"
   transition.to(label,{time=1000,xScale=1,yScale=1})
end
local function transition_2()
   label.text = "Label_2"
   transition.to(label,{time=1000,x=label.x+50,y=label.y+50,onComplete=transition_3})
end
transition.to(label,{time=1000,xScale=1.5,yScale=1.5,onComplete=transition_2})

Keep coding........ :)

2
votes

What krs said -- basically, a text object is a display object just like an image. You can do just about anything to a text object that you can do to an image.