Sure, here you are:
[code]
local function nuvola()
local starTable = {} – Set up star table
function initStar()
local star1 = {}
star1.imgpath = “nuvola.png”; --Set Image Path for Star
star1.movementSpeed = 10000; --Determines the movement speed of star
table.insert(starTable, star1); --Insert Star into starTable
end --END initStar()
function getRandomStar()
local temp = starTable[math.random(1, #starTable)] – Get a random star from starTable
local randomStar = display.newImage(temp.imgpath) – Set image path for object
randomStar.myName = “star” – Set the name of the object to star
randomStar.movementSpeed = temp.movementSpeed; – Set how fast the object will move
randomStar.x = math.random(0,_W) – Set starting point of star at a random X position
randomStar.y = -50 – Start the star off screen
–randomStar.rotation = math.random(0,360) – Rotate the object
starMove = transition.to(randomStar, {
time=randomStar.movementSpeed,
y=_H,
onComplete = function(self) self.parent:remove(self); self = nil; end
}) – Move the star
end–END getRandomStar()
function startGame()
starTimer4 = timer.performWithDelay(1700,getRandomStar, 0)
end–END startGame()
initStar()
startGame()
end
stop = function()
timer.cancel(starTimer4)
starTimer1= nil
end
tmr2 = timer.performWithDelay (10000, nuvola, -1)
tmr3 = timer.performWithDelay (30000, stop, 0)
[/code] [import]uid: 159775 topic_id: 28252 reply_id: 114215[/import]