--- flash_filter.module	2006-08-30 12:39:43.000000000 -0400
+++ flash_filter.module.new	2006-08-30 12:39:33.000000000 -0400
@@ -2,6 +2,7 @@
 
 require_once ( drupal_get_path('module', 'flash_filter').'/swfheader.class.php' );
 theme_add_style ( drupal_get_path('module', 'flash_filter').'/flash_filter.css' );
+drupal_add_js(drupal_get_path('module','flash_filter') . "/swfobject.js");
 
 /**
  * Drupal core hooks and setting are defined here, at the beginning of code
@@ -363,38 +364,9 @@
     $f_wmode   = ($params['wmode']   ? $params['wmode']   : $wmode[variable_get('flash_filter_movie_wmode', '0')]);
     $f_swlive  = ($params['swliveconnect'] ? $params['swliveconnect'] : $logics[variable_get('flash_filter_movie_swliveconnect', '0')]);
 
-    $html =  '<span id="flash_object" class="flash_object' . ( $f_name ? '-' . $f_name : '' ) . '"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' . $swf->version . ',0,0,0" width="' . $f_width . '" height="' . $f_height . '" id="' . $f_name . ( $f_align ? '" align="' . $f_align : '' ) . '">' . $endl ;
-    $html .= '<param name="allowScriptAccess" value="sameDomain" />' . $endl ;
-    $html .= '<param name="bgcolor" value="'. $f_bgcolor .'" />' . $endl ;
-    $html .= '<param name="loop"    value="'. $f_loop    .'" />' . $endl ;
-    $html .= '<param name="menu"    value="'. $f_menu    .'" />' . $endl ;
-    $html .= '<param name="movie"   value="'. $f_source  .'" />' . $endl ;
-    $html .= '<param name="play"    value="'. $f_play    .'" />' . $endl ;
-    $html .= '<param name="quality" value="'. $f_quality .'" />' . $endl ;
-    $html .= ( $f_salign ? '<param name="salign"  value="'. $f_salign  .'" />' . $endl : '' ) ;
-    $html .= '<param name="scale"   value="'. $f_scale   .'" />' . $endl ;
-    $html .= '<param name="wmode"   value="'. $f_wmode   .'" />' . $endl ;
-    $html .= ( $f_swlive == 'true' ? '<param name="swliveconnect" value="'. $f_swlive .'" />' . $endl : '' ) ;
-    if ($Flash_Vars) {$html .= '<param name="FlashVars" value="'  . $Flash_Vars . '" />' . $endl ;}
-    $html .= '<embed src="' . $f_source
-          .'" wmode="'   . $f_wmode
-          .'" bgcolor="' . $f_bgcolor
-          .'" loop="'    . $f_loop
-          .'" menu="'    . $f_menu
-          .'" play="'    . $f_play
-          .'" quality="' . $f_quality
-          .'" scale="'   . $f_scale
-          .'" width="'   . $f_width
-          .'" height="'  . $f_height
-          .'" name="'    . $f_name . '"'
-          . ( $f_salign ? ' salign="' . $f_salign . '"' : '' )
-          . ( $f_align  ? ' align="'  . $f_align  . '"' : '' )
-          . ( $f_swlive == 'true' ? ' swliveconnect="' . $f_swlive . '"' : '' )
-          . ' allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"'
-          . ($Flash_Vars ? $endl.' FlashVars="'.$Flash_Vars.'"' : '')
-          .' />' . $endl ;
-    $html .= '</object></span>' . $endl ;
-    
+  $html .= "<div id='flashcontent'></div>";
+  $html .= "<script>var so = new SWFObject('". $file_path . "', 'movie', '". $params['width'] ."','" . $params['height'] ."','" . str_replace('.swf', '', $file_path). "'); so.write('flashcontent');</script>";
+
     return $html;
 }
 
