View Full Version : Stopping the audio once inside my site

10-27-2003, 11:30 PM
I have posted this in the wrong area, sorry, can someone move it. Thanks

Here's my problem. I have a scenario as follows and I'll just lay it out using a couple of pages as an example..

My main page (index.htm)
Another page, we'll call that gallery.htm

At the top of each page is a header that is a flash animation that plays some music upon entrance to the site (actually each page but I can fix that by calling another flash animation without the sound, no problem....) My problem is that if I hit the home button or the back button it goes back to the main page and calls the header file with the sound. Is there anyway to say that if you're navigating from within the site to NOT play the music ?

Here's the code....

From the index.htm file

<script language="JavaScript" src="header-sound.js"></script>

And from the header-sound.js......

<!-- Begin

document.write('<TABLE cellpadding=0 cellspacing=0 border=0 width="100%" BGCOLOR="#D12428"><tr><td ALIGN="LEFT">');

document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="750" HEIGHT="50" id="logo-nosound" ALIGN="">');
document.write('<PARAM NAME=movie VALUE="mylogo.swf">');
document.write('<PARAM NAME=quality VALUE=high>');
document.write('<PARAM NAME=wmode VALUE=transparent>');
document.write('<PARAM NAME=bgcolor VALUE=#D12428>');
document.write('<EMBED src="mylogo.swf" quality=high wmode=transparent bgcolor=#D12428 WIDTH="750" HEIGHT="50" NAME="mylogo" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');


// End -->


10-28-2003, 03:49 AM
Sorry to be a bit off-topic but the best fix is NOT to play music when you load a site.

Most of the people I know (including me) are currently listening to tunes of their own choice when surfing the web. It's really bad to interfere with their listening pleasure by foisting a tune upon them. :)

Don't do it in the first place, problem solved. ;)

10-28-2003, 02:17 PM
The website is for a band who happens to write and play music. There is an option for the visitor to turn the music off if they wish. Anyways, the way I will do it is by setting a variable the first time through and then while you're navigating within the site the value of this variable can be known.

Problem Solved....

10-28-2003, 02:30 PM
I'm with whammy on this one.
I find it extremely annoying when site's have their own music going on, especially flash-sites that you cannot turn off !!!

I have winamp running 24/7, basically, and I have the volumebar set at 20% or so, so that I can turn it up when my favoriteparts come.
Guess what happens when I enter a site that has music going on ???

What I think you should do is to rethink this, what does the visitors want, what do they like ? Have an option that can enable music if the visitor want to, I can promise you most visitors would prefer that solution unless they are really desperate for some music!

Imagine if all the prOn-sites had 'sounds' on their sites
lol :D

10-28-2003, 03:00 PM
I agree with you as well that it would probably be better for them to opt to turn the music on, it's just a 45 sec cut of one of the bands songs. It was just the 'tone' of the 'dont do it in the first place, problem solved.' that got me ticked off. I am open to criticism of my thoughts and ideas, I have to go through it during code reviews at work. It's just the delivery of the criticism that got me fired up.


10-29-2003, 02:26 AM
Sorry if you took that the wrong way, it was definitely intended as constructive criticism.

Actually, I've been playing guitar 16 years, and I'm in a band - and I _still_ wouldn't play any music (even mine) by default when the page loads, just because as a professional web developer and a dedicated web surfer I know how annoying it can be. Now a big flashy banner or a link that is promoted in some way to let the user know you can hear a song by "said band" would be just fine (although perhaps annoying to some people, they would just have to live with it!). :)

I never did see the original text of your "ticked off" post, since apparently George took care of it (and to be honest I have been too busy maintaining or updating legacy code, apparently originally done by developers that were either rushed or didn't care about maintenance - and the code is so horrible it makes you want to beat up the guy who originally did it)!

But hopefully we are on the same page now. :)

10-29-2003, 03:46 AM
Yep, we are.

If you want, you can check out my sons website (http://www.highriskband.com/highrisk/main.htm) to listen to some of their music. Sorry, but there is sound in there. That will change with the new website I am doing now.:)


10-29-2003, 03:55 AM
I'll definitely check it out. :)