Chapter 4 – Game Controls

Q1 How do you properly remove a display object from the stage?

3

Q2 What is the correct way to make the following display object into a physics object?

local ball = display.newImage("ball.png")

3

Q3 What best represents what "began" means in the following function?

local function onCollision( event )
  if event.phase == "began" and event.object1.myName == "Box 1" then

    print( "Collision made." )

  end
end

4