ok I have my image.. that is shaking.. working on that in last post.. and I need to make the shaking
start right when audio plays.. or other way around.. just want them both to run at the same time..
so I had this code code to embed.. but it just plays when its ready
and now I'm trying the audio class.. but it doesnt ever play.. I do something wrong or really wrong.. orHTML Code:<audio preload autoplay> <source src="ElectFizzle.mp3" type="audio/mpeg"> <source src="ElectFizzle.OGG" type="audio/ogg"> <embed src="ElectFizzle.mp3"> </audio>
should I just try something else ?
ideas ?Code:function SyncAudioVibrate() { iStartPos=document.getElementById("Logo1").offsetLeft; StartPos=iStartPos.toString()+"px"; var audio = new Audio(); audio.addEventListener('canplaythrough', LogoAction(audio), false); audio.src = 'ElectFizzle.OGG'; } function LogoAction(Myaudio) { vibrate(); Myaudio.play(); }


Reply With Quote