all groups > flash (macromedia) > december 2005 >
You're in the

flash (macromedia)

group:

im making an online guitar thing need help


im making an online guitar thing need help pjjj
12/25/2005 9:30:00 PM
flash (macromedia): hey all
any experts out there, im playing multiple pieces of audio using actionscript
on a button and i want to delay or space out the playing of each piece so they
dont just all play at once but a few tenths of a second after each other. (im
trying to make a guitar strum a chord but i dont want to have to space the
audio clips out on the timeline). is it possible to do that in flash
thanks:confused;
Re: im making an online guitar thing need help NSurveyor
12/26/2005 3:14:34 AM
You could use setInterval, for example:

soundsToPlay = ["sound1","sound2","thethirdsound"];
s = 0;
soundID = setInterval(playSound,300);
function playSound(){
var x = new Sound();
x.attachSound(soundsToPlay[s]);
x.start();
s++;
if(s>=soundsToPlay.length){
clearInterval(soundID);
}
}

Re: im making an online guitar thing need help pjjj
12/29/2005 7:05:43 PM
Re: im making an online guitar thing need help NSurveyor
12/29/2005 11:00:44 PM
AddThis Social Bookmark Button