Flash And Drupal Technique

Last modified: October 28, 2009 - 20:45

Flash
(especially ActionScript 3) has excellent support for loading, parsing
and using data provided in XML format. This XML can be anything from a
SOAP request to a static .xml file on a server.

XML is simply a way of structuring data in a way which makes it easy for different applications and systems to share that data.
When we want to access external data in Flash, we use XML as the communication protocol.

Combined with the powerful Drupal CMS, we can create a PHP script witin the Drupal system which has access to everything the Drupal API has to offer.

In this way, we can simply call our script from within a Flash movie embedded in a page, allowing live access to the Drupal system from the very powerful flash player.

There is also the power of amfphp and the services module

gavri - October 28, 2009 - 05:38

There is also the power of amfphp and the services module.

using these two modules - you can build a secure two way (input and output connection) to your swf file.

the amfphp protocol is faster than xml in both sending the information and parsing it on the Flash/Flex side

example?

Becky Kinney - November 8, 2009 - 18:38

Can you provide an example php script that is callable from Flash and has access to the Drupal API? I have tried both bootstrapped php and conventional php (that doesn't attempt to use the Drupal API). Both work as long as I'm not calling from a subdomain site, but the bootstrapped version does not work when I try to call it from a subdomain site.

The swfs I'm using are written in AS2. I can't easily convert to AS3, because I make heavy use of Flash (not Flex) components that simply don't exist in Flash under AS3. I need an Accordion, Buttons, Alerts and more. Plus, I don't really want users to have to upgrade their Flash players, and if at all possible, I'd like Drupal site builders not to have to install too many dependent mods. Calling a php script is second nature to me, as is storing data as xml. I'm just having trouble getting my php pages reliably hooked into the Drupal API. A working sample and a description of how I can build the php script into a module would be much, much appreciated.

Becky Kinney

 
 

Drupal is a registered trademark of Dries Buytaert.