Here is a function that I made, it spawns an object at a fixed location, but I want it to spawn randomly inside the phone screen (which is 1080x1920).
-- BALLOON SPAWN FUNCTION
function spawnBalloon( event )
balloon = display.newImage("balloon1.png")
balloon.x = display.contentCenterX
balloon.y = display.contentCenterY
balloon:addEventListener("tap", spawnBalloon)
balloon:addEventListener("tap", removeBalloon)
end
How can I do that?