/*codebaby{Context.Project=Symmetree Web Site}*/
/*codebaby{Context.SceneGroup=}*/
/*codebaby{Context.Stage=}*/
/*
  CodeBaby JavaScript Library
  Copyright (c) 2004-2006 CodeBaby Corp.
  All rights reserved.
  This source code can only be distributed in accordance with the terms of the license agreement entered into
  with CodeBaby.

  Version: LEX
  $Rev: 2608 $
  $Date: 2007-02-28 15:09:25 -0700 (Wed, 28 Feb 2007) $
  $URL: http://svn/svn/Development/JSLib/Trunk/Project/cb/javascript/${Project(%Name%)}.js $
*/	 

////////////////////////////////////////////////////////////////////////////////
// Project Listener Class //////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

/**
  This class is used for listening to CodeBaby events on the project level.
*/
function CBProjectListener() {};

/**
  Called by the container when it is ready to receive events from JavaScript.
  This is called for the first time after the console is loaded.
*/
CBProjectListener.prototype.onContainerReady = function() {

    // insert your custom event handling code here
    
}

 
/**
  Called by the container when a new scene is loaded.
  
  @param sceneName The name of the new scene.
*/
CBProjectListener.prototype.onSceneLoad = function(sceneName) {

    // insert your custom event handling code here
    
}

 
/**
  Called by the container when the play state has changed.  E.g. the user has
  hit the "pause" button.
  
  @param newState The number corresponding to the new play state:
         playing = 0, stopped = 1, paused = 2, buffering = 3.
*/
CBProjectListener.prototype.onPlayStateChange = function(newState) {
    
    // insert your custom event handling code here
    
} 

/**
  Called by the flash container movie when the initialization is complete:
  XML data and the console movie is loaded.
  
  @param sceneList An array of the scenes for this publish set (e.g. "Scene1") 
*/ 
CBProjectListener.prototype.onSceneGroupLoad = function(sceneList) { 
    
    // insert your custom event handling code here
}

  
/**
  Called when the player is shown.
*/	
CBProjectListener.prototype.onPlayerShow = function() {  

    // insert your custom event handling code here

}

 
/**
  Call when the player is hidden.
*/	
CBProjectListener.prototype.onPlayerHide = function() { 
   
    // insert your custom event handling code here

}

 
/**
  Called when the user clicks anywhere on the scene movie.
*/ 
CBProjectListener.prototype.onSceneClick = function() {

    // insert your custom event handling code here

}


/**
  Called when the user has clicked the "draggable" area of the console.
  This tells the JavaScript to start dragging.
*/
CBProjectListener.prototype.onConsoleDrag = function() {

    // insert your custom event handling code here

}


/**
  Called when the console sends a "custom" event.  This way, you can add custom
  controls to your console which causes some action in JavaScript.
  
  @param param Custom parameter, sent by the console movie.
*/	
CBProjectListener.prototype.onConsoleCustomEvent = function(param) { 

    // insert your custom event handling code here

}


/**
  Called when an "external action", as entered in Production Composer, is fired.
  
  @param name The name of the external action
  @param description The description entered in Production Composer
*/
CBProjectListener.prototype.onExternalAction = function(name, description) {
    
    // insert your custom event handling code here
        
}


/**
  Called when the flash movie is requesting a url change.  

  @param url The url we need to go to.
  @param target The target for the url (e.g. "_blank", "_self")
*/
CBProjectListener.prototype.onGetURL = function(url, target) {
    
    // insert your custom event handling code here
        
}


/**
  Called by the container when a "nav to pubset" is requested.  Currently,
  this just opens <PublishSetName>.html, but you can customize this in the
  case that you move your publish set files around.
  
  @param sceneGroupName The name of the publish set.
*/
CBProjectListener.prototype.onNavigateToSceneGroup = function(sceneGroupName) {
    window.open(sceneGroupName + ".html", "_self"); 
}


/**
  Called when a debug message is sent from the CodeBaby flash container.  When
  debugging, you might write these messages to a DIV for example.
  
  @param message The debug message as a string.   
*/	
CBProjectListener.prototype.onDebugMessage = function(message) { 
   
    // insert your custom event handling code here

}


/**
  Called when any speech bubble is displayed.
*/	
CBProjectListener.prototype.onShowSpeechBubble = function() { 
    
    // insert your custom event handling code here
    
}


/**
  Called when any speech bubble starts to fade out.
*/	
CBProjectListener.prototype.onHideSpeechBubble = function() { 

    // insert your custom event handling code here

}


/**
  Called when any speech bubble is hidden/closed.
*/	
CBProjectListener.prototype.onSpeechBubbleHidden = function() { 
   
    // insert your custom event handling code here

}


/**
  Called when a speech bubble link is clicked (i.e. the user has responded to
  a speech bubble question).
  
  @param speechBubbleName The name of the speech bubble that send the response
  @param linkId The ID of the link that was clicked.
*/	
CBProjectListener.prototype.onResponse = function(speechBubbleName, linkId) {

    // insert your custom event handling code here

}

