     $(".nMain").children().hide()
     $(".nScreenNewGame").show()
 
-noughts.FacebookInviteMenu = me.ScreenObject.extend
-  onResetEvent: (urlBehavior) ->
+noughts.FacebookInviteMenu = noughts.Screen.extend
+  onEnterState: (urlBehavior) ->
     # TODO(dthurn): Log user into facebook here if they aren't yet.
     noughts.state.updateUrl("/facebookInvite", urlBehavior)
     $(".nMain").children().hide()


# Loads the game with the specified ID
playGame = (gameId) ->
  noughts.state.changeState(noughts.state.PLAY, noughts.state.PUSH_URL, gameId)

# Pops up an alert to the user saying that an error has occurred. Should be used
# for un-recoverable errors.

SPRITE_Z_INDEX = 2 # The Z-Index to add new sprites at

noughts.state =
  PLAY: "PLAY"
  INITIAL_PROMO: "INITIAL_PROMO" # Initial game description state
  NEW_GAME_MENU: "NEW_GAME_MENU" # Game state for showing new game menu
  FACEBOOK_INVITE: "FACEBOOK_INVITE" # Game state for showing new game menu
  LOADING: "LOADING" # Game loading state

# Changes the current game state to 'newState'. The optional "urlBehavior"
# parameter shoud be a noughts.state.UrlBehavior, and the browser URL will be
