Please Note!
SWF Embed module should be used as a replacement for this.

This is a small module that implements the SWFObject javascript library to make it easier to add flash to Drupal modules and themes. Because browsers have had issues with flash rendering (IE) javascript libraries can be used to improve the situation. The SWFObject library (http://code.google.com/p/swfobject/) is a good implementation.

There are two versions of this module which support the 1.5 and 2.x versions of SWFObject. Currently development is switching to support the 2.x versions, please use the 2.x versions of the module. Drupal 6+ versions will only support SWFObject 2.x and higher.

This module provides an easy theming function (which is compatible between both 1.x and 2.x versions of the module) which makes adding SWF files a snap:

<?php
   $url
= "myflashfile.swf"; //path to flash file
  
$params = array('width' => 100, 'height' => 100 );
  
$vars =  array(
    
'file' => base_path() . path_to_theme() .'/files/song.mp3',
    
'image' =>  base_path() . path_to_theme() ./files/image.jpg',
    );
   print theme("swfobject_api", $url, $params, $vars);
?>

To use this module, you must download the SWFObject library and place it in the swfobject_api module directory.

Please Note
This module is different than the swfobject.module as it is specifically designed to implement an API only. If you want to add flash blocks, you might want to look at that module.

This module is partially supported by CivicActions.

Project Information

Downloads