-
attachSound - playing 2 tracks at the same time
Hi guys,
I was wondring is it possible to play 2 sounds at the same time using the attachSound method? Not able to get it to work and cant find any help anywhere on the net.
The code im using at the minute is:
--------------------------------------
mySound=new Sound();
mySound.attachSound("song1");
mySound.start();
mySoundVolume = 50;
mySound.setVolume(mySoundVolume);
--------------------------------------
Thanks!
-
FK'n_dog
tie the sounds to created movieclip timelines
this gives you individual control over each sound -
Code:
this.createEmptyMovieClip("aClip",1000);
aSound=new Sound(aClip);
aSound.attachSound("song1");
aSound.start();
aSoundVolume = 50;
aSound.setVolume(aSoundVolume);
this.createEmptyMovieClip("bClip",1001);
bSound=new Sound(bClip);
bSound.attachSound("song2");
bSound.start();
bSoundVolume = 50;
bSound.setVolume(bSoundVolume);
btn.onRelease = function(){
stopper=(pressed=!pressed) ?
bSound.stop() :
bSound.start();
}
hth
-
Originally Posted by a_modified_dog
tie the sounds to created movieclip timelines
this gives you individual control over each sound -
Code:
this.createEmptyMovieClip("aClip",1000);
aSound=new Sound(aClip);
aSound.attachSound("song1");
aSound.start();
aSoundVolume = 50;
aSound.setVolume(aSoundVolume);
this.createEmptyMovieClip("bClip",1001);
bSound=new Sound(bClip);
bSound.attachSound("song2");
bSound.start();
bSoundVolume = 50;
bSound.setVolume(bSoundVolume);
btn.onRelease = function(){
stopper=(pressed=!pressed) ?
bSound.stop() :
bSound.start();
}
hth
Super, thanks alot, gona give this a try now to see how it goes.
Many thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|