Quote:
Originally Posted by tpeck
This is a bit odd. The sound will play and then go to the video (which is what I want) but only if I include the alert!
Code:
soundManager.play('scratch','../../media/mp3/scratch.mp3');
alert("why do you need me?");
document.writeln("<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" width=\"480\" height=\"336\">");
document.writeln("<param name=\"src\" value=\"file:///"+driveletter+":/MEDIA/VIDEO/Lesson27.mov\">");
document.writeln("<embed width=\"480\" height=\"336\" type=\"video/quicktime\" pluginspage=\"http://www.apple.com/quicktime/download/\" src=\"file:///"+driveletter+":/MEDIA/VIDEO/Lesson27.mov\" controller=\"true\" autoplay=\"true\" scale=\"aspect\"></embed>");
document.writeln("<param name=\"controller\" value=\"true\">");
document.writeln("<param name=\"autostart\" value=\"true\">");
document.writeln("<param name=\"scale\" value=\"aspect\">");
document.writeln("</object>");
}}
If I take out the alert, the sound gets bypassed.
How can I get rid of the alert and have the sound play then go to the video?
Something about giving the sound enough time to play?
|
Try wrapping the code for the video in a function with setTimeout with a couple of seconds delay.
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
|