It was looking for the end of a line before you wrote end. In other words you have too many ends.
Try this - as usual put your own images back in;
[lua]local physics = require (“physics”);
physics.start();
physics.setGravity(0.0 , 0.0)
local function listener(me)
transition.to (me, {time = math.random(1000,4000), x = math.random(1,310), y = math.random(1,470), onComplete = function()listener(me)end});
end
local function trackBubbles(obj)
obj:removeSelf();
end
–Spawning multiple objects in randoms locations
local function spawnBubble()
local bubble = display.newImageRect(“smile.png”, 45, 45);
bubble:setReferencePoint(display.CenterReferencePoint);
bubble.x = math.random(-321, 600);
bubble.y = math.random(-481, 400);
transition.to( bubble, {mRand = math.random(1000,4000), time = math.random(1000, 4000), x = math.random(1,310), y = math.random(1,470), onComplete = function()listener(bubble)end});
physics.addBody(bubble, {density = 0.1, bounce = 1.3, friction = 0.3, radius = 22});
function bubble:touch(b)
if (b.phase == “ended”) then
–play pop sound
audio.play(pop_sound);
–Remove bubbles
trackBubbles(self);
end
return true;
end
–Adding touch event
bubble:addEventListener(“touch”, bubble);
end
tmr = timer.performWithDelay(1000, spawnBubble, total_bubbles);
–Background image
local background = display.newRect( 0, 0, 320, 480 )
background:setFillColor(0,200,255)
–Floor image
local floor = display.newRect (0,460,320,20);
floor:setReferencePoint(display.CenterReferencePoint);
–floor.x = _W/2; floor.y = 489.5;
physics.addBody(floor, “static”, {friction = 0.4, bounce = 0.3});[/lua]
Let me know how that goes for you 
Peach [import]uid: 52491 topic_id: 27457 reply_id: 114190[/import]