kinetic
04-21-2009, 12:59 AM
Hi, I am new to using javascript or any code for that matter and I am trying to get an animated gif to play at the same time as my wav file since sound can't be added to the gif. I attempted to make them both load completely before either starts playing but I am obviously doing something wrong because they still aren't synchronized. Here is my code attempt so please let me know where I went wrong. BTW the web page I am trying to do this on is kineticsparks.com in case you need to see it. Thanks!
<img name="kinetic" src="http://web.mac.com/kineticadvertising/media/kineticadvertisingdoneaniweb.gif" width="800" height="600" border="0" alt=" ">
<EMBED
SRC="http://web.mac.com/kineticadvertising/media/sparks.wav"
HEIGHT=60 WIDTH=144>
<HEAD>
<TITLE>play</TITLE>
<script language="javascript">
function done(){
var movie = window.document.kineticadvertisingdoneaniweb.gif";
movie.play();
}
function done2(){
var sound=window.document.sparks.wav";
sound.play();
}
</script>
</HEAD>
<BODY bgcolor="#FFFFFF" onLoad="done();done2()">
</BODY>
</HTML>
<img name="kinetic" src="http://web.mac.com/kineticadvertising/media/kineticadvertisingdoneaniweb.gif" width="800" height="600" border="0" alt=" ">
<EMBED
SRC="http://web.mac.com/kineticadvertising/media/sparks.wav"
HEIGHT=60 WIDTH=144>
<HEAD>
<TITLE>play</TITLE>
<script language="javascript">
function done(){
var movie = window.document.kineticadvertisingdoneaniweb.gif";
movie.play();
}
function done2(){
var sound=window.document.sparks.wav";
sound.play();
}
</script>
</HEAD>
<BODY bgcolor="#FFFFFF" onLoad="done();done2()">
</BODY>
</HTML>