# Playing multiple sounds at once? PLEASE HELP :(

**URL:** <https://forum.kirupa.com/t/playing-multiple-sounds-at-once-please-help/326856>\
**Category:** Uncategorized\
**Created:** [January 17, 2012, 1:37am UTC](https://forum.kirupa.com/t/playing-multiple-sounds-at-once-please-help/326856 "2012-01-17T01:37:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisW182](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@ChrisW182](https://forum.kirupa.com/u/ChrisW182)\
**Post date:** [January 17, 2012, 1:37am UTC](https://forum.kirupa.com/t/playing-multiple-sounds-at-once-please-help/326856/1 "2012-01-17T01:37:51Z")

</div>

Hi guys, sorry i seem to be posting a lot at the moment but i am trying to get my Flash Skills up to date, hope im not annoying anyone too much :).

Basically i have a small project where pressing a button will trigger a sound, So when i click ‘Button1’ it plays the sound assigned to ‘Button1’, I have done this like the following.

```auto

//variables for button sounds
var playlistArray:Array = new Array();
var buttonsOnArray:Array = new Array();
mainHold.Bass1_mc.fileName="bass1.mp3"
mainHold.Bass2_mc.fileName="bass2.mp3"

//event listeners for sound buttons
mainHold.Bass1_mc.addEventListener(MouseEvent.CLICK, soundSelected);
mainHold.Bass2_mc.addEventListener(MouseEvent.CLICK, soundSelected);

function soundSelected(evt:MouseEvent):void{
    playlistArray.push(evt.target.fileName);//pushes the filename into a playlist array.
    buttonsOnArray.push(evt.target.name);//pushes the instance names of the buttons 'on'.
    trace ("PlayList = "+playlistArray);
    trace ("Buttons On are ="+buttonsOnArray);
    for (var i:int = 0; i < playlistArray.length; i++)
    {    
        var channel = new SoundChannel;
        snd.load(new URLRequest(evt.target.fileName));
        channel = snd.play();
        snd.play(0,9);
    }

```

One sound will play fine, however, i cannot make two sounds play at the same time. The error i get is.

Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.  
at flash.media::Sound/\_load()  
at flash.media::Sound/load()  
at loopwall\_fla::MainTimeline/soundSelected()

Eventually i am going to have 20 different sounds, i know i need to probably assign each sound to its own individual sound channel. i tried manipulating the for statement to say something like var \*Channel = new SoundChannel; in the hope that it would assign a number next to the SoundChannel thus making it unique, but nope.

Any help would be, as always, greatly appreciated  
Thanks! 🙂
