# How to put sounds into an Array and then stop them?

**URL:** <https://forum.kirupa.com/t/how-to-put-sounds-into-an-array-and-then-stop-them/327664>\
**Category:** flash\
**Created:** [March 17, 2012, 9:19pm UTC](https://forum.kirupa.com/t/how-to-put-sounds-into-an-array-and-then-stop-them/327664 "2012-03-17T21:19:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![netmonkey](https://avatars.discourse-cdn.com/v4/letter/n/f04885/32.png) [@netmonkey](https://forum.kirupa.com/u/netmonkey)\
**Post date:** [March 17, 2012, 9:19pm UTC](https://forum.kirupa.com/t/how-to-put-sounds-into-an-array-and-then-stop-them/327664/1 "2012-03-17T21:19:09Z")

</div>

Hi, this is hopefully a straightforward thing… I’m a beginner, so I’m unclear about how to set up variables. I prefer to play sounds from my library using linkage, so can anyone please tell me how to pass an array of sounds into the SoundChannel, so that I can stop them all at once?

It’s for a ‘toggle voiceover’ button, so perhaps better to use Sound transform to mute the Sound Array. Any ideas?

This is what I have so far. (Page1 etc is my linkage sound name)

```auto
var GlobalVoice:Array = ["Page1", "Page2", "Page3"];

var Globalchannel:SoundChannel = new SoundChannel();

GlobalVoice = Globalchannel;

var transformVoice:SoundTransform=new SoundTransform();

transformVoice.volume=0;

Globalchannel.soundTransform=transformVoice;

```

The problem is Line 3, which I’m just guessing at, in order to pass a Sound Array into the SoundChannel, but it doesn’t work…

Thanks!
