Code One
06-17-2003, 01:16 AM
Hello,
I am trying to make a wav player and what I got so far is how to select an embed src, have it saved in a string, and then played when I click the play button. Now here is what I would really like to happen.
I would like for this page - (Help!.htm):
===================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Help me!</title>
<script language="JavaScript">
var playlist = new Array();
var x = -1;
function add(sound){
x=x+1;
playlist[x] = sound;
}//ends add()
function play_it(){
for (i = 0; i < playlist.length; i++){
document[playlist[i]].Play();
}//ends FOR
}//ends play_it()
</script>
</head>
<body>
<a href="javascript: add('a')">Music1</a><br><br>
<a href="javascript: add('b')">Music2</a><br><br>
<a href="javascript: add('c')">Music3</a><br><br>
<form>
<input type="button" value="Play" onClick="play_it()">
<input type="button" value="Reset" onClick="history.go()">
</form>
<!-- Sound Embeds -->
<embed name="a" src="Music1.wav" autostart="false" hidden="true" loop="false"></embed>
<embed name="b" src="Music2.wav" autostart="false" hidden="true" loop="false"></embed>
<embed name="c" src="Music3" autostart="false" hidden="true" loop="false"></embed>
</body>
</html>
========================================================
to be referenced and fired in another page - (I'm helped.htm):
========================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Help me!</title>
<script language="JavaScript">
function ???????(){
????????????????
</script>
</head>
<body>
<Iframe src="Help me!.htm" width=100 height=100>
<input type="button" onClick="??????()">
</body>
</html>
=========================================================
so that the sound files embeded in the "Help me!.htm" page will be saved in a string somewhere and can be fired and played in the "I'm helped.htm" page.
Any help is appreciated,
Code One
I am trying to make a wav player and what I got so far is how to select an embed src, have it saved in a string, and then played when I click the play button. Now here is what I would really like to happen.
I would like for this page - (Help!.htm):
===================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Help me!</title>
<script language="JavaScript">
var playlist = new Array();
var x = -1;
function add(sound){
x=x+1;
playlist[x] = sound;
}//ends add()
function play_it(){
for (i = 0; i < playlist.length; i++){
document[playlist[i]].Play();
}//ends FOR
}//ends play_it()
</script>
</head>
<body>
<a href="javascript: add('a')">Music1</a><br><br>
<a href="javascript: add('b')">Music2</a><br><br>
<a href="javascript: add('c')">Music3</a><br><br>
<form>
<input type="button" value="Play" onClick="play_it()">
<input type="button" value="Reset" onClick="history.go()">
</form>
<!-- Sound Embeds -->
<embed name="a" src="Music1.wav" autostart="false" hidden="true" loop="false"></embed>
<embed name="b" src="Music2.wav" autostart="false" hidden="true" loop="false"></embed>
<embed name="c" src="Music3" autostart="false" hidden="true" loop="false"></embed>
</body>
</html>
========================================================
to be referenced and fired in another page - (I'm helped.htm):
========================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Help me!</title>
<script language="JavaScript">
function ???????(){
????????????????
</script>
</head>
<body>
<Iframe src="Help me!.htm" width=100 height=100>
<input type="button" onClick="??????()">
</body>
</html>
=========================================================
so that the sound files embeded in the "Help me!.htm" page will be saved in a string somewhere and can be fired and played in the "I'm helped.htm" page.
Any help is appreciated,
Code One