Links to Midi Files

J

Jenny

Hi - I use FrontPage 2000 to maintain our church's website. The children's
Sunday School class wanats to be able to play some midi files from one of
the pages. I don't want them to play automaticially when the page loads, but
instead by clicking on links. I've created the links and they work fine, but
Windows Media Player opens in front of the web page. Is there any way to
keep the midi player from being visible? Thanks for your help, Jenny
 
T

Trevor L.

Jenny said:
Hi - I use FrontPage 2000 to maintain our church's website. The
children's Sunday School class wanats to be able to play some midi
files from one of the pages. I don't want them to play automaticially
when the page loads, but instead by clicking on links. I've created
the links and they work fine, but Windows Media Player opens in front
of the web page. Is there any way to keep the midi player from being
visible? Thanks for your help, Jenny

Jenny,
I use a javascript function playSound() to play the audio file

It is called from the HTML by:
<span id="sound"></span>
<input type="button" value="Play/Stop
Music" onclick="playSound()" />

This doesn't bring the player to the foreground, I think because of the
parameter "hidden".

You need to use Code or HTML view to place this code in your page

The function is placed in the <head> section between
<script type="text/javascript"> and </script>
i.e.
<script type="text/javascript">
function playSound(fname)
{
if (!fname)
var fname = "audio/minuet.mid"
var x = document.getElementById("sound")
x.innerHTML = (!x.innerHTML)
? '<embed src=" ' + fname + ' "loop=false autostart=true
hidden>' : ' '
}
</script>

The HTML is placed in the <body> section wherever you want the button
 
J

Jenny

Trevor L. said:
Jenny,
I use a javascript function playSound() to play the audio file

It is called from the HTML by:
<span id="sound"></span>
<input type="button" value="Play/Stop
Music" onclick="playSound()" />

This doesn't bring the player to the foreground, I think because of the
parameter "hidden".

You need to use Code or HTML view to place this code in your page

The function is placed in the <head> section between
<script type="text/javascript"> and </script>
i.e.
<script type="text/javascript">
function playSound(fname)
{
if (!fname)
var fname = "audio/minuet.mid"
var x = document.getElementById("sound")
x.innerHTML = (!x.innerHTML)
? '<embed src=" ' + fname + ' "loop=false autostart=true
hidden>' : ' '
}
</script>

The HTML is placed in the <body> section wherever you want the button

Terrific! That worked great. Trevor, thank you very much for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Midi Music Files 1
Using Midi music files in Front Page 1
WMP won't play MIDI files 7
MIDI files on web sites 2
Can't Play MIDI 4
Midi files 8
Embedded Midis and Midi Links Freeze PC 2
Embedding sounds 3

Top