It looks like you're new here. If you want to get involved, click one of these buttons!
local function waveText(str, font, color) local i = 1 local x = 0 local xOffset = 5 local grp = Sprite.new() local mc,t,w local yMove = 25 local tOffsetInc = 5 local tOffset local t1,t2,t3 for c in str:gmatch(".") do if c ~= " " then t = TextField.new(font, c) t:setTextColor(color) --t:setX(x) w = t:getWidth() tOffset = (i-1)*tOffsetInc t1,t2,t3 = tOffset+1,tOffset+50,tOffset+100 mc = MovieClip.new{ {t1,t2,t,{y={-yMove,yMove,"inOutSine"}}}, {t2,t3,t,{y={yMove,-yMove,"inOutSine"}}} } mc:setGotoAction(t3,t1) mc:setX(x) grp:addChild(mc) else w = 15 end x = x + w + xOffset i = i + 1 end return grp end |
Comments