...

View Full Version : Flashsound embedding problem with IE and Firefox



tpeck
02-05-2005, 01:13 AM
Thank you Aerospace Eng. for fixing up my top margin discrepancy between Firefox and IE.

However, I still have the original problem (which I did not explain before) which is a difference between how IE and Firefox deal with embedding Flashsound.

Why is Firefox not playing my Flashsound until the page is fully scrolled? Is the embedding not recognised until the scroll is done? Why? And why is IE reading the entire page first, but not Firefox?

It will be difficult to demonstrate this problem properly because my server doesn't yet allow the flashsound to work - that's my next problem to solve (I don't know why) - but you can see what I mean, and please take it on trust that the problem is as described when I play it offline (sorry).

The demonstrations are at:

http://aapress.com.au/demo/flashsounddemo(500px).htm
and
http://aapress.com.au/demo/flashsounddemo(1000px).htm

If I take Aerospace's original code to make the top margins the same in both IE and Firefox, and add the code for Flashsound, the top margin will remain the height I want ONLY if I put the embed at the bottom of the page before the </div>. OK. In IE there is no additional height added to the top margin. In Firefox, there is for some reason. But placing the code at the bottom solves this - up to a point.

For if the page is short, say 500px, mousing over the image will produce the Flashsound as desired. But if the page is long, say 1000px, only IE will play the sound. Firefox WILL play the sound but only if the viewer scrolls down the page to the bottom and back up again!

Of course, this scrolling is not desirable, but if I put the code at the top of the page, I have the top margin problem again.

It's beyond me.

The code is below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<style type="text/css">
html, body {
margin:0px;
padding:0px;
background-color:#800000;
}
#content {
margin:auto;
width:98%;
height:500px;
margin-top:20px;
}
#table1 {
border-collapse: collapse;
height:1000px; //or 500px which works in both browsers
width:100%;
border:1px solid #111111;
}
#table1 td {
background-color:#FFFFEE;
}
</style>
<script language="JavaScript" src="flashsound.js"></script>
<script language="JavaScript">
var mysound = new FlashSound( );
</script>
</head>

<body bgcolor="#800000">
<div id="content">
<table id="table1">
<tr>
<td>
<p align="center">
sound works in both IE and Firefox&nbsp;&nbsp;&nbsp; <a href="javascript://" onClick="return false" onmouseover="mysound.TGotoAndPlay('/wd161','start')" onMouseout="mysound.TgotoAndStop('/wd161','stop')">
<img border="0" src="speak1.png" align="center" width="38" height="45"></a>&nbsp;&nbsp;
mouseover the face to play...</td>
</tr>
</table>
<script language="JavaScript">
// must go at the bottom so as not to interfere with the top margin height in Firefox)
mysound.embedSWF("word.swf");
</script>
</div>
</body>

</html>

********************

Any help gratefully received.

Thanks

Terry

tpeck
02-05-2005, 01:36 AM
Oh dear,

JUST WASTED YOUR TIME.

All I had to do was update the flashsound.js to the latest version and it all works!

So sorry - even you can play the demo on my site. Feel so stupid.

Thanks,

Terry

robbiejh12
02-06-2005, 06:14 PM
Heh heh, if you mouse over it over and over again it sounds like addict addict addict. Lol. :p



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum