Hello all,
I've got a facebook like button ( iFrame edition ) that is overlaid on top of a full browser Flash application. The like button is hooked up to like separate images within the application, and when each new images is shown, the like button is refreshed with data using ExternalInterface.
The like button fades in and out for each new image using JQuery fadeIn() / fadeOut(), again being called with ExternalInterface.
The issue I'm having is that on Windows, this does not seem to want to work, in Firefox specifically...
CSS:
html {
height: 100%;
overflow: hidden;
min-width: 800px;
min-height: 600px;
}
#flashContent {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
z-index: 1;
}
body {
margin: 0;
padding: 0;
background-color: #000000;
}
#fb-like {
position: absolute;
bottom: 32px;
left: 510px;
width: 280px;
z-index: 9999;
display: none;
}
fb-like is the div containing the iFrame, and it's z-index is 9999 just to ensure it is always on top.
Here is the JS being used:
<script type="text/javascript">
var isVisible = false;
function showLikeButton( visible ){
if( visible == true )
{
$('#fb-like').fadeIn( 'slow' );
isVisible = true;
}
else if ( isVisible )
{
$('#fb-like').fadeOut( 'slow' );
isVisible = false;
}
}
var begOfUrl = "http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmywebsite.com%2fdirectory";
var endOfUrl = "&layout=button_count&show_faces=false&width=150&action=like&colorscheme=dark&height=21";
function sendIdToLikeButton( title, id ){
$( '#facebook-like' ).attr( 'src', begOfUrl + "%3Fid=" + id + endOfUrl );
}
</script>
where the sendIdToLikeButton method is taking the id of the photo sent from Flash using ExternalInterface to recreate the src attribute of the iFrame.
And of course, as this is a flash application, here is the minimal HTML:
<body>
<div id="fb-like">
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnfb.designaxiom.com/build13&amp;layout=button_count&amp;show_faces=false&amp;width=150&amp;action=like&amp;colorscheme=dark&amp;height=21" scrolling="no" frameborder="0" style="position: absolute; border:none; overflow:hidden; width:300px; height:40px;" allowTransparency="true" id="facebook-like"></iframe>
</div>
<div id="flashContent">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>
</body>
Again, this works everywhere except for Firefox in Windows, and I'm not sure what to do about it. I'm assuming that it is an error in the CSS or the Javascript somewhere.
Any help is greatly appreciated.
Thanks in advance.
Grammar