Index: swftools.module
===================================================================
--- swftools.module	(revision 222)
+++ swftools.module	(working copy)
@@ -321,8 +321,9 @@
       $vars->params['src'] = swftools_get_media_url($resolved_methods->player['shared_file']);
       break;
     default:
-      $vars->params['src_path'] = swftools_get_player_path() .'/'. $resolved_methods->player['shared_file'];
-      $vars->params['src'] = $GLOBALS['base_url'] .'/'. swftools_get_player_path() .'/'. $resolved_methods->player['shared_file'];
+      $vars->params['src_path'] = swftools_get_player_path($resolved_methods->player) .'/'. $resolved_methods->player['shared_file'];
+      $vars->params['src'] = $GLOBALS['base_url'] .'/'. $vars->params['src_path'];
+      break;
   }
 
   // Merge default and user defined "params".
@@ -579,25 +580,24 @@
 
 /**
  * Returns a flash player path relative to webroot. The default value is
- * in the modules/swftools/shared directory.
+ * in the modules shared directory.
  * It may suit some sites to store flash players in an alternative location, but
  * the assumption is the location will be on the same server.
  * If the path starts with '/', then we can assume is relative to the webroot.
  * Otherwise we assume it's in the files directory.
  *
  */
-function swftools_get_player_path($dir = FALSE) {
-  if (!$dir) {
-    $dir = variable_get('swftools_player_path', '');
-    if (!$dir) {
-      $dir = drupal_get_path('module', 'swftools') .'/shared';
+function swftools_get_player_path($player = NULL) {
+  if ($dir = variable_get('swftools_player_path', '')) {
+    if (substr($dir, 0, 1) == '/') {
+      $dir = ltrim($dir, '/');
     }
+    else {
+      $dir = file_create_path($dir);
+    }
   }
-  elseif (substr($dir, 0, 1) == '/') {
-    $dir = ltrim($dir, '/');
-  }
   else {
-    $dir = file_create_path($dir);
+    $dir = drupal_get_path('module', $player ? $player['module'] : 'swftools') .'/shared';
   }
   return $dir;
 }
