Table of Contents
Preface
Chapter 1: Flash with Drupal
Chapter 2: Building a "Hello World" Application
Chapter 3: Flash and CCK
Chapter 4: Drupal Images in Flash
Chapter 5: Drupal Audio in Flash
Chapter 6: Flash Video in Drupal
Chapter 7: The Hybrid Approach Part 1: Componentization
Chapter 8: The Hybrid Approach Part 2: Remote Control
Chapter 9: Flash with Drupal Views
Chapter 10: User Management
Chapter 11: Adding Content to Drupal
Chapter 12: Build a Drupal Five-star Voter in Flash
Index
- Chapter 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
- Installing 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 new Flash project
- 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
- Creating a background
- Adding Flash content to Drupal
- Installing a contributed Drupal module
- Adding Flash!
- Summary
- Chapter 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
- Step 4: Session handling
- Connecting to Drupal using system.connect
- Step 5: Drupal says "Hello World"
- Loading a node in Flash
- Step 6: Hooking up the text
- Step 7: Passing the node ID using FlashVars
- Step 8: Adding it to Drupal
- Understanding web services
- Summary
- How Flash and Drupal communicate
- Chapter 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
- Adding ScrollBars to our TextFields
- Creating a Drupal node template for Flash
- Using the Content Template module (Contemplate)
- Summary
- Chapter 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
- 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
- Adding the new Recipe Flash application to Drupal
- Summary
- Image handling in Drupal
- Chapter 5: Drupal Audio in Flash
- Working with audio in Drupal
- 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
- 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!
- Modifying our main.as file to use our new AudioPlayer
- Adding a play and pause button
- Summary
- Working with audio in Drupal
- Chapter 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
- Creating a video content type
- Summary
- Working with video in Drupal
- Chapter 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
- Using static functions
- Summary
- Chapter 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
- Creating a FlashNode template
- Flash to JavaScript communication
- Summary
- Client-side Flash communication
- Chapter 9: Flash with Drupal Views
- Using the Drupal Views module
- 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
- Creating a node teaser
- Summary
- Using the Drupal Views module
- Chapter 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
- Drupal user management
- 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
- Chapter 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 DrupalService functionality to main.as
- The API key
- 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
- Adding a background to our node
- Changing the node view
- Creating a node edit form
- Creating view, edit, and add tabs
- Adding content to Drupal from Flash
- Adding tab functionality
- Saving a node from Flash
- Editing existing content in Drupal
- Summary
- Drupal Services security
- Chapter 12: Build a Drupal Five-star Voter in Flash
- Building a custom Voting Service for Drupal
- The module info file
- Voting Service module
- Installing the Voting Service module
- Building a Custom Service
- Registering external web services using hook_service
- Defining web service callback functions
- Adding arguments and voting logic using Voting API
- Building a five-star voter in Flash
- Voter design
- Making some stars
- Adding different vote types
- Adding the vote layers to the mask layer
- Adding vote hit regions
- Voter design
- Creating a Voter class in ActionScript
- Initializing the voter
- Adding the event handlers
- Handling the voting hover events
- Getting a vote from Drupal
- Setting a vote in Drupal
- Adding the voters to main.as
- Summary
- Building a custom Voting Service for Drupal



