Hi all,
Think this may be a simple one.
I have the following code:
<? $guestbook = "1.txt";
$readfile = fopen($guestbook, "r");
$guestbook2 = "2.txt";
$readfile2 = fopen($guestbook2, "r");
?>
soundManager.onload = function() {
var mySound = soundManager.createSound({
id: 'wind',
url: '<? echo @fread($readfile, filesize($guestbook)); ?>'
// onload: [ event handler function object ],
// other options here..
});
var myNextSound = soundManager.createSound({
id: 'bell',
url: '<? echo @fread($readfile2, filesize($guestbook2)); ?>'
// onload: [ event handler function object ],
// other options here..
});
var myThirdSound = soundManager.createSound({
id: 'swipe',
url: ''
// onload: [ event handler function object ],
// other options here..
});
mySound.play({
onfinish: function() {
setTimeout(myNextSound.play, 2000); // call myNextSound.play() two seconds after mySound finishes
}
});
}
How do I write the bottom play function so that I can add up to ten? i.e myFourthSound, myFifthSound and so on.
Thanks in advance