How to control sound separately in flash?
May 5, 2008
some times, we stop a music, another sound will be off. how to control the sounds separately?
this is way:
createEmptyMovieClip(“sound_1″, 1);
my_sound_1 = new Sound(sound_1,1);
my_sound_1.attachSound(“music_xxx”);
my_sound_1.start();
createEmptyMovieClip(“sound_2″, 2);
my_sound_2 = new Sound(sound_2,1);
my_sound_2.attachSound(“music_xxx”);
my_sound_2.start();
Note: the 2 MovieClips need be placed in different layer. for example:one is in 1 layer, another is in 2 layer.
now when we control my_sound_1, can not affect my_sound_2.
Thanks WenJie for his advice!
XueYong
Entry Filed under: Action Script. .
1 Comment Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed

1.
sharedesign | May 5, 2008 at 8:28 am
thanks xue yong, this is really useful while working with multiple sounds..
- susheer