Book Image

Flash with Drupal

Book Image

Flash with Drupal

Overview of this book

Due to its power and expandability, Drupal has become one of the most popular open source content management systems. At the same time, Flash has been adopted for its ability to create beautiful and dynamic web applications. By combining these technologies, you can create Flash applications that are both visually stunning and rich in content. This book is an in depth discussion and tutorial on how to integrate Flash applications with Drupal CMS. It will describe the best techniques and practices for integrating Flash technology with the power and flexibility of Drupal by building real-life Flash applications. Within this book, you will learn how to build Flash applications that show text from within Drupal and also present images, music, and video within a single Flash application. You will also be able to take advantage of the expandable fields and content filtering provided from the CCK and Views modules to add flexibility and power to your Flash applications. Finally, you will learn how to add your own custom functionality to Drupal and then utilize that from within your Flash applications leaving you with a world of possibilities. This book starts out with a simple introduction to Flash and Drupal technology where you will create a simple Flash application and then embed that within Drupal. From there, each subsequent chapter builds on the previous chapters tackling a new and challenging task. For each new task, you will take a step-by-step approach to building a real-life application that utilizes the feature introduced within that chapter. You will also explore alternative design approaches that will eliminate the current design challenges that developers face when building Flash-driven Drupal sites; and all this while staying true to the Object Oriented Principles that govern the foundation of the ActionScript 3 language. By the end of this book, you will be able to apply all the lessons learned from this book to any other use case you may encounter.
Table of Contents (17 chapters)
Flash with Drupal
Credits
About the Author
About the Reviewer
Preface

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...