Flash with Drupal build dynamic, content-rich Flash CS3 and CS4 applications for Drupal 6

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

Full description

Saved in:
Bibliographic Details
Main Author: Tidwell, Travis
Format: eBook
Language:English
Published: Birmingham PACKT Publishing 2009
Packt Publishing, Limited
Packt Publishing Limited
Packt Publishing Ltd
Edition:1st ed.
Subjects:
ISBN:9781847197580, 1847197590, 9781847197597, 1847197582
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Table of Contents:
  • Views: Installation and Configuration -- Setting up a view -- Creating a new page view -- Adding fields to a view -- Adding a Filter to our view -- Using the Views Service -- Step 1: Install the Views Service -- Step 2: Configure user permissions -- Step 3: Verify it works -- Building a Flash Playlist using Drupal -- Creating a node teaser -- Creating a teaser background -- Using the timeline to add different teaser states -- Adding a title to the teaser -- Creating a Teaser class -- Building a ListView class -- Adding our ListView to Flash -- Adding the ListView to our Media Player -- Creating a Media Region -- Populating the list view -- Summary -- 10. User Management -- Drupal user management -- Adding new user roles -- Adding permissions to a user role -- Creating new users and assigning them roles -- The User Service module -- Installing the User Service -- Configuring permissions -- Configuring the User Service module -- Building a Flash user login block -- Welcoming our logged-in users -- Creating a login button -- Adding some status text -- Creating a mcLogin movie clip -- User handling within Flash -- Hooking up our login button -- Checking for a username and password -- Logging into Drupal -- Adding a user responder -- Logging in -- Logging out -- Summary -- 11. Adding Content to Drupal -- Drupal Services security -- The API key -- API key configuration -- The allowed domain and crossdomain.xml -- How to use the API key -- Building a Drupal service in Flash -- The DrupalService class -- Adding the API key to our DrupalService -- Adding arguments to the service call -- Adding the base URL -- Adding the TimeStamp -- Adding the nonce -- Adding a hash -- Adding DrupalService functionality to main.as -- Building a node editor in Flash -- Creating view, edit, and add tabs -- Adding normal, hover, and selected states
  • Duplicating the mcView for the edit and add tabs
  • Installing the getID3 library -- Setting up the Audio content type -- Creating an Audio node -- How our player will be different (and better) -- Building a custom audio player for Drupal -- Examining the Audio node using Services Administrator -- Referencing the audio file path -- Writing a custom AudioPlayer class -- Playing audio in Flash -- Using our AudioPlayer class to play audio -- Adding controls to your custom audio player -- Adding a play and pause button -- Creating a base button MovieClip -- Adding the PlayButton movie clip -- Drawing a play icon -- Creating a pause button from the play button -- Linking MovieClips to ActionScript -- Adding the AudioPlayer to the stage -- Modifying the AudioPlayer class to use play and pause -- Step 1: Adding the SoundChannel -- Step 2: Adding load, play, and pause functions -- Step 3: Reference the mcAudioPlayer MovieClip -- Step 4: Hooking up our buttons! -- Declaring playButton and pauseButton as buttons -- Modifying our main.as file to use our new AudioPlayer -- Summary -- 6. Flash Video in Drupal -- Working with video in Drupal -- Creating a video content type -- Adding a video file field -- Installing and configuring the jQuery Media module -- Configuring the jQuery Media module -- Installing a media player -- Creating a video node -- Building a custom video player in Flash -- Creating a MediaPlayer base class -- Adding play and pause button instances to MediaPlayer -- Removing uncommon code from MediaPlayer -- Modifying the AudioPlayer class to derive from MediaPlayer -- Extending and overriding base (super) class functionality -- Creating a VideoPlayer class -- Working with Video, NetStream, and NetConnection -- Initializing our video variables -- Creating the video object -- Adding video functionality -- Adding video load -- Adding play and pause functionality
  • Creating a new VideoPlayer MovieClip -- Linking the VideoPlayer to Drupal -- Loading and playing our Drupal video -- Adding our custom media player to Drupal -- Summary -- 7. The Hybrid Approach Part 1: Componentization -- What is the hybrid approach? -- Creating a media player control bar -- Creating a ControlBar class -- Removing the ControlBar dependency from MediaPlayer -- Adding the ControlBar to the stage -- Communication between ControlBar and MediaPlayer -- Creating a communication gateway -- Using static functions -- Using the this pointer -- Making the connections -- Adding the ControlBar to our Flash project -- Removing the control bar from the MediaPlayer -- Summary -- 8. The Hybrid Approach Part 2: Remote Control -- Client-side Flash communication -- Flash to JavaScript communication -- Calling a JavaScript function from Flash -- Calling a Flash function from JavaScript -- Initializing the ExternalInterface -- Adding the MediaGateway initialization to main.as -- Adding outgoing messages to the MediaGateway -- Adding remote or local functionality -- Building a JavaScript Gateway -- Locating a Flash application using JavaScript -- Creating the gateway functions between two Flash applications -- Flash and JavaScript synchronization -- Step 1: Create an array of communicating Flash applications -- Step 2: Flash calls to see if the JavaScript Gateway is ready -- Step 3: Flash application registers with JavaScript -- Step 4: JavaScript initializes our Flash when all have registered -- Using our remote control within Drupal -- Adding the JavaScript Gateway to Drupal -- Adding our Media Player to Drupal -- Changing our Content Template -- Adding the Remote Control -- Adding block visibility for video and audio node types -- Creating a FlashNode template -- Summary -- 9. Flash with Drupal Views -- Using the Drupal Views module
  • Step 4: Session handling -- Connecting to Drupal using system.connect -- Step 5: Drupal says "Hello World -- Loading a node in Flash -- Programming without race conditions -- Step 6: Hooking up the text -- Step 7: Passing the node ID using FlashVars -- Using FlashVars in a Flash application -- Step 8: Adding it to Drupal -- Summary -- 3. Flash and CCK -- Overview of a typical recipe web site -- Using Drupal's Content Construction Kit -- Creating a new content type -- Adding custom fields to your Recipe content type -- Adding a new field -- Changing the default Body field -- Showing CCK fields in Flash -- Building a Recipe widget in Flash -- Adding dynamic TextFields for Drupal content -- Using ActionScript to show Drupal CCK fields -- Using the Services Administrator -- Showing CCK information in ActionScript -- Showing the node description -- Showing the ingredients and instructions CCK field -- Adding ScrollBars to our TextFields -- Creating a Drupal node template for Flash -- Using the Content Template module (Contemplate) -- Summary -- 4. Drupal Images in Flash -- Image handling in Drupal -- ImageField for CCK -- Installing the ImageField module -- Adding an Image field to our Recipe content type -- Adding an image to our Recipe node -- Verifying that the image is attached -- Adding an image to our Recipe Flash application -- Adding a MovieClip container for our image -- Using ActionScript to load the Recipe image -- Working with the Image path -- Creating a loadImage function -- Loading an Image -- Resizing an image -- Preserving the width and height ratio (scaling) -- Using Drupal's ImageCache with Flash -- Creating an ImageCache preset -- Adding an ImageCache image in Flash -- Changing our ActionScript for ImageCache -- Adding the new Recipe Flash application to Drupal -- Summary -- 5. Drupal Audio in Flash -- Working with audio in Drupal
  • Intro -- Flash with Drupal -- Table of Contents -- Flash with Drupal -- Credits -- About the Author -- About the Reviewer -- Preface -- What this book covers -- What you need for this book -- Who this book is for -- Conventions -- Reader feedback -- Customer support -- Downloading the example code for the book -- Errata -- Piracy -- Questions -- 1. Flash with Drupal -- Why Flash with Drupal? -- Who is this book for? -- Getting started with Drupal -- Installing Drupal -- Installing Apache-MySQL-PHP (AMP) -- Creating the Drupal database -- Creating a database user -- Increasing PHP memory -- Installing Drupal -- Adding content to Drupal -- Getting started with Flash -- Creating a new Flash project -- Setting up the workspace -- A: The Stage -- B: The Toolbar -- C: The Timeline -- D: The Properties panel -- E: The Color Palette -- F: The Library -- Creating a Flash application -- Creating a background -- Rectangle properties -- Adding a gradient -- Adding text to a Flash application -- Text properties -- Compiling our Flash application (making a SWF) -- Publish Settings -- Adding Flash content to Drupal -- Installing a contributed Drupal module -- Adding Flash! -- Summary -- 2. Building a "Hello World" Application -- How Flash and Drupal communicate -- Understanding web services -- Synchronous versus asynchronous programming -- Setting up Drupal for web services -- Installing and configuring the Services module -- Servers and Services -- Installing AMFPHP -- Services configuration -- Creating a Services key -- Services settings -- Service Permissions -- Building a web service-driven "Hello World" application in Flash -- Step 1: Creating our Flash application -- Step 2: Creating a main.as ActionScript file -- Step 3: Connecting to Drupal -- Using the NetConnection class -- Connecting to a remote gateway -- Using the NetConnection call routine
  • Flash with Drupal: Build dynamic, content-rich Flash CS3 and CS4 applications for Drupal 6