Forum Moderators: open

Message Too Old, No Replies

Playing an audio clip AFTER the page loads

How to get clip to activate upon opening

         

Hank

7:59 pm on Apr 20, 2004 (gmt 0)

10+ Year Member



New Member here:
How can I get an audio clip to play AFTER (so it won't slow up the load) the URL is desplayed and they are reading the page?

smokeyb

10:02 pm on Apr 20, 2004 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld
You could make a flash movie with the audio, and have on and off buttons to give people the choice. It would still have to load but you may be able to have it load last by its positioning... I think.

Hank

11:03 pm on Apr 20, 2004 (gmt 0)

10+ Year Member



I have never tried audio, and really want it to start by itself. Is it possible with "Front Page"?

vkaryl

11:33 pm on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, you can always go back a few steps/years, and use "embed" (which works but is surely deprecated). If you want to play with it, sticky me, and I'll send you an example of a working embed that I did for my nephew a few years back. He has since gone on to bigger and better things, but the code DOES work.

It will NOT validate, however, in anything other than "quirks" mode, if that....

smokeyb

9:40 pm on Apr 21, 2004 (gmt 0)

10+ Year Member



I don't use Frontpage myself, but apparently...
The feature is here:
(while normal tab is selected)
Format->Background->General (Tab)-> Location (Under Background Sound)

FP 2000 inserts an IE only tag, <bgsound>, a better approach, IMO would be to use an <embed> element with CSS using the display: none property.


HTH

Symbios

9:49 pm on Apr 21, 2004 (gmt 0)

10+ Year Member



Also why not put the code at the bottom of the page, this way it loads last.

ergophobe

10:07 pm on Apr 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



FYI

Now that flashing marquees and blinking text are pretty much gone, audio that starts by itself is my pet peeve on the web.

In 99% of the cases, this is something, like blinking text, that people do because they can, not because it makes a better site. Especially disturbing for people who surf where others can hear (or are trying to sleep/work/talk whatever).

bgrobe

12:16 am on Apr 25, 2004 (gmt 0)

10+ Year Member



Try using javascript.Try the below:

<head>
<script language=javascript>
function start_audio()
{
document.write("<embed src=audio_file.wav">);
}
</script></head>
<body onLoad="start_audio()">
</body></html>.

If I remember correctly, it should not play the file till the body tag has loaded, but if the tag loads before the rest of the file is loaded, then it plays before the page is finished. Give it a try, it may work. Make sure you change the <embed> tag.

[edited by: tedster at 1:03 am (utc) on April 25, 2004]
[edit reason] turn off smile graphics [/edit]