# SoundChannel null issue

**URL:** <https://forum.kirupa.com/t/soundchannel-null-issue/287604>\
**Category:** flash\
**Created:** [May 4, 2009, 10:06am UTC](https://forum.kirupa.com/t/soundchannel-null-issue/287604 "2009-05-04T10:06:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaxz](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jaxz](https://forum.kirupa.com/u/jaxz)\
**Post date:** [May 4, 2009, 10:06am UTC](https://forum.kirupa.com/t/soundchannel-null-issue/287604/1 "2009-05-04T10:06:32Z")

</div>

**SoundChannel null issue**  
In my code I frequently call a volume adjusting function where I assign new volumes to all soundchannels in use with a simple command.  
The error I encounter comes when I call this function before all soundChannels have been initiated with an actual sound.

The critical part of my code is this:

```auto

var themetransform:SoundTransform = new SoundTransform(setVol);
  if (SC_B != null); {       

       SC_B.soundTransform = themetransform; // Causes Error
   }                              
   

```

I get an error saying “can’t access null object” or similar – and this follows after my check if the SC\_B is null.  
This issue only arises early in the execution of my project, that is before SC\_B has been assigned to a sound\_B.play() instance.  
Is there any other way than comparing to null as above that I can use to prevent this error?

```
  Please advice, 

```

Jaxz :hr:
