Hey Everybody,

On our site, we use JS to access a flash embed as a media sampler. There is a strange thing that happens in the latest release of firefox only for users running a *NIX OS. All other s user setups, i.e. Safari on OSX, Firefox latest on Win XP, have no trouble with this. But for some reason, firefox wont call the function if the user is running *NIX (same release for Windows calls it fine). Usually, it has been working fine. The error has been people simply dont have flash player installed, hence the error message. But we've gotten reports of people that have flash player installed (version 7 to be exact) on their NIX setups still throwing the error.

The Code:

The flash object in the template
Code:

Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1" height="1" id="previewPlayer" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="movie" value="previewPlayer.swf" />
	<param name="quality" value="high" />
	<param name="bgcolor" value="#ffffff" />
<embed src="previewPlayer.swf" quality="high" bgcolor="#ffffff" width="1" height="1" name="previewPlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>


The JS to access the flash object
Code:

Code:
function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
    return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
    {
      return document.embeds[movieName]; 
    }
  } 
  else {
    return document.getElementById(movieName);
  }
}
var g_previewPlayer = null;
var g_currentSampleElement = 0;
function initFlashPlayer()
{
	return g_previewPlayer = new Object(getFlashMovieObject("previewPlayer"));
}

function handlePreview(id,e) 
{
	if( g_previewPlayer==null )
	{
		initFlashPlayer();
	}
	if ( id == 0 )
	{
		try
		{
			g_previewPlayer.handlePreview(g_currentSampleElement,g_currentSampleElement);
		}
		catch(err) {
			alert("Oops!  You may not have Adobe Flash Player Installed.\nPlease install Adobe Flash to listen to samples\nhttp://www.adobe.com/flashplayer\n");		}
	}
	else {
		g_currentSampleElement = e;
	    try
	    {
	    g_previewPlayer.handlePreview(id,e);
	    } 
	    catch(err) {
	    	alert("Oops!  You may not have Adobe Flash Player Installed.\nPlease install Adobe Flash to listen to samples\nhttp://www.adobe.com/flashplayer\n");
	    }
	}
}


Any ideas on what could be causing this? Possibly something in the getFlashMovieObject funtion and the way its accessing the DOM?

Thanks,
Lucas