Here is the result I need
http://www.youtube.com/watch?v=ZLpquSlLpwM
When I firstly create a rounded rect by a list of circle show below
local circle_rad = 4
local startX,startY = 50,150
local RDHeight = 176
local RDWidth = 226
local distance =2
local max1 = RDWidth/distance
local max2 = (RDWidth + RDHeight)/distance
local max3 = (RDWidth*2 + RDHeight)/distance
local max4 = (RDWidth + RDHeight)*2/distance
local ite = 1
--Formula:
– Max 1 = Width /distance
– Max 2 = (Width + Height)/distance
– Max 3 = (Width*2 + Height)/distance
– Max 4 = (Height + Width)*2/distance
for i=1,max4 do
if ite < max1 then
test[ite] = display.newCircle( startX + ite*distance, startY, circle_rad )
test[ite]:setFillColor( 0,1, 50/255,1)
TabInfo:insert(test[ite])
elseif ite > max1 and ite < max2 then
test[ite] = display.newCircle( startX + max1*distance, startY + (ite-max1)*distance, circle_rad )
test[ite]:setFillColor( 0,1, 50/255,1)
TabInfo:insert(test[ite])
elseif ite >= max2 and ite < max3 then
test[ite] = display.newCircle( startX + max1*distance - (ite-max2)*distance, startY + (max2-max1)*distance, circle_rad )
test[ite]:setFillColor( 0,1, 50/255,1)
TabInfo:insert(test[ite])
else
test[ite] = display.newCircle( startX , startY + (max2-max1)*distance - (ite-max3)*distance, circle_rad )
test[ite]:setFillColor( 0,1, 50/255,1)
TabInfo:insert(test[ite])
end
ite = ite+1
--TabInfo:insert(test)
end
ite = 1
local function disappear( event )
test[ite]:removeSelf( )
--transition.to(test[ite], {time = 0 ,alpha = 0})
ite = ite+1
end
timer.performWithDelay( 1, disappear, max4 )
But It cannot manage the timer & too many circle cost memory. Anyone have solution for it. I hope the timer satify the condition:
1.Smooth: Timer go smoothly
2.Path: Timer go in path (like Roundedrect)
3.Vector: Setting the param to change the path
4.Time: Setting time for timer ended