local composer = require ("composer")
local scene = composer.newScene()

local mainGroup

local tmr

local function onComplete (event)
    composer.gotoScene( "gameInstructions", "crossFade", 2500 )
end

function scene:create( event )
    local mainGroup = self.view
end

function scene:show( event )
    local phase = event.phase

    if ( phase == "will" ) then

    elseif ( phase == "did" ) then
        media.playVideo( "assets/intro.mp4", false, onComplete )
    end
end

function scene:hide( event )
    local phase = event.phase

    if ( phase == "will" ) then

    elseif ( phase == "did" ) then

    end
end

function scene:destroy( event )

end

-- Listener setup
scene:addEventListener( "create", scene )
scene:addEventListener( "show", scene )
scene:addEventListener( "hide", scene )
scene:addEventListener( "destroy", scene )

return scene