Building a Flash Playlist using Drupal
Before we begin this section, we will first need to copy the chapter8
folder, and then paste it as a new folder called chapter9
so that we can keep all changes made to our media player separate from the previous chapter. After we have done this, we will start out by opening up the main.as
file, where we will add some functionality to load a Drupal view. The first task will be to create a new function called loadView
that we will use to encapsulate the responder and service call to Drupal. We can place this function below our loadNode
function as follows:
// Loads a Drupal node.
function loadNode( nid:Number )
{
// Set up our responder with the callbacks.
var nodeResponse:Responder = new Responder( onNodeLoad, onError);
// Call Drupal to get the node.
drupal.call( "node.get", nodeResponse, sessionId, nid );
}
// Loads a Drupal view.
function loadView( _viewName:String )
{
// Set up the responder with the callbacks.
var viewResponse:Responder = new Responder...