# Targeting Specific Sounds out of an Array

**URL:** <https://forum.kirupa.com/t/targeting-specific-sounds-out-of-an-array/225094>\
**Category:** flash\
**Created:** [May 8, 2007, 8:00pm UTC](https://forum.kirupa.com/t/targeting-specific-sounds-out-of-an-array/225094 "2007-05-08T20:00:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lordnahkim](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lordnahkim/32/3089_2.png) [@lordnahkim](https://forum.kirupa.com/u/lordnahkim)\
**Post date:** [May 8, 2007, 8:00pm UTC](https://forum.kirupa.com/t/targeting-specific-sounds-out-of-an-array/225094/1 "2007-05-08T20:00:33Z")

</div>

Hey Folks! I hope everyone is having a lovely time with their latest works. I haven’t dealt with sound in flash much and encountered a snag I’m hoping someone could give me some insight on. I have an array of sounds I want to attach to my movie and need to control them independently of each other. Currently all my sounds play at once when I set the start(); method. I can’t target a specific sound with something like: mcSnd.mcSoundHolder\_1.start(); because its a movieclip not a sound object. So how do I target individual sound objects loaded into an array?

Here’s my script:

fBepSoundEffects = function () {  
var mcSoundLib:MovieClip = this.createEmptyMovieClip(“mcSoundLib”, 1);  
var sfArray:Array= Array(“bgBeat”, “tvZoom”, “warp”);  
for (var i:Number = 0; i\<sfArray.length; i++) {  
var mcSnd:MovieClip = mcSoundLib.createEmptyMovieClip(“mcSoundHolder\_”+i, i);  
var sndRef:Sound = new Sound(mcSnd);  
sndRef.attachSound(sfArray\*);  
sndRef.start();  
}  
};

I’m sure its something simple or I maybe I can’t use sound objects like typical objects?

I appreciate any words of advice the more knowledgeable can provide. Thanks in advance!!
