There are ways to chain your transitions. I made this code for another thread recently, maybe it helps you along. You can copy paste it into a main.lua and run it to see how it works.
[lua]
local player = display.newRect(111,111,30,30)
local bg = display.newRect(111,300,500,800)
bg:setFillColor(0.2,0.4,0.2)
local foods = {}
local goingToFood = 0
local currentlyTransition = false
local goToNext
local function goToFood()
if foods[goingToFood+1] and not currentlyTransition then
goingToFood = goingToFood + 1
currentlyTransition = true
transition.to(player,{onComplete = goToNext, tag = “playerTransition”, time = 2000, x = foods[goingToFood].x, y = foods[goingToFood].y})
end
end
function goToNext()
currentlyTransition = false
goToFood()
end
local function touch(e)
if e.phase == “began” then
foods[#foods+1] = display.newCircle(0,0,5)
foods[#foods].x , foods[#foods].y = e.x , e.y
goToFood()
end
end
bg:toBack()
bg:addEventListener(“touch”,touch)
[/lua]
Simplified version:
[lua]local player = display.newRect(111,111,30,30)
local destinations = {
{x = 200, y = 200},
{x = 100, y = 100},
{x = 200, y = 300}
}
local currentlyGoingTo = 0
local function startTransition()
currentlyGoingTo = currentlyGoingTo + 1
if destinations[currentlyGoingTo] then
transition.to(player, {x = destinations[currentlyGoingTo].x, y = destinations[currentlyGoingTo].y, onComplete = startTransition})
end
end
startTransition()[/lua]