(Tips) Flash Integration into Drupal 6

Tips : Flash Integration into Drupal 6

Flash provides a great interface for customizable interactions, but with typical Flash development, it's cumbersome to edit content after publishing an application. For many Flash projects, updating content after the fact isn't important. But if you want to save data or update information in your Flash application, then you're going to want to look at having some sort external data source.

External data for a Flash application can be accomplished by simply having the flash application read cookies or text files on your web server. This bare-bones approach is appropriate for some, but such an approach is pretty low-level and susceptible to bugs. If you want an application to have any sort of ongoing maintainability, then you'll want to have some sort of CMS to house your information. Because of its flexibility and widespread use, Drupal is an excellent choice for your CMS.

This tutorial is geared towards Drupal developers who may or may not have a background in Actionscript coding. You'll need to know how to install modules and be comfortable with digging into a .module file to tweak some code.

What you'll need

  • Drupal - You can use either Drupal 5 or 6, but you should probably use 6, especially if you don't have to worry about legacy code. This tutorial will use Drupal 6.
  • A Flash compiler - The obvious choice is Adobe's Flash product (http:// www.adobe.com/products/flash/), but you can use any flash compiler. More info on open-source flash at http:// osflash.org/.
  • Services Module (http:// drupal.org/project/services)- This module is one-half of the glue that sticks Drupal and Flash together. The services module provides an extremely easy way to take Drupal data outside of the CMS into various different environments.
  • AMFPHP & AMFPHP module - (http://www.5etdemi.com/blog/archives/2007/01/amfphp-19-beta-2-ridiculous..., http:// www.amfphp.org/) - AMFPHP is the second=half of the Drupal/FLash glue. AMFPHP provides a data gateway between PHP applications and Flash.
  • Text Editor - I'm currently in love with Coda, but any editor will do. (Adobe's Flash product has a text editor built in.)


Step 1 - Set up Drupal & Services module

Setting up Drupal is fairly straightforward. If you aren't already familiar with how to install Drupal on your server, there are plenty of good tutorials on the subject elsewhere on the web.

The Services module is also pretty straightforward to install. Just like any other module, throw the folder into the modules folder (either /sites/all/modules or /sites/[your-site-name]/modules), then enable the module as usual.

In addition to the Services module, you'll want to turn on some of the services that are included in the Services module. You'll definitely want to turn on the System service module. This module allows you to, among other things, pull a session ID and user item, which is going to be important later. You'll also want to turn on any of the other services you'll need. For the purposes of this tutorial, I am turning on the System and Node services.

| Read more..

Courtesy : Thanksfornotsuing.com