local star = {}
for i=1,50 do
star[i] = display.newCircle(math.random(0,display.contentWidth),math.random(0,display.contentHeight), math.random(1,3))
star[i].anchorX =0.5
star[i].anchorY =0.5
star[i].time = math.random(3,20)
star[i].animateUp = function ()
star[i].x = math.random(0,display.contentWidth)
star[i].y = math.random(0,display.contentHeight)
transition.to( star[i], { time= star[i].time * 100, alpha = 1, xScale = 1, yScale = 1, onComplete=star[i].animateDown } )
end
star[i].animateDown = function ()
transition.to( star[i], { time= star[i].time * 500, alpha = 0, xScale = 0.01, yScale = 0.01, onComplete=star[i].animateUp } )
end
star[i].animateDown()
end