# Sound control problem

**URL:** <https://forum.kirupa.com/t/sound-control-problem/201920>\
**Category:** Uncategorized\
**Created:** [September 26, 2006, 10:20am UTC](https://forum.kirupa.com/t/sound-control-problem/201920 "2006-09-26T10:20:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![d\_champ](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@d\_champ](https://forum.kirupa.com/u/d_champ)\
**Post date:** [September 26, 2006, 10:20am UTC](https://forum.kirupa.com/t/sound-control-problem/201920/1 "2006-09-26T10:20:28Z")

</div>

I have always been using this code

```php
onClipEvent(load)
    {
        
        _root.mySound = new Sound();
        maxvolume=100;
        minvolume=0;
    }
    
onClipEvent(enterFrame)
    {
        if(_root.soundstatus=="on") {step=3}
        if(_root.soundstatus=="off") {step=-3}
        
        maxvolume+=step;
        
        if (maxvolume>100) {maxvolume=100;}
        if (maxvolume<0) {maxvolume=0;}        
    
        _root.mySound.setVolume(maxvolume);
    }

```

to control the on/off function of the background music.  
Ever since I upgraded to Flash Pro 8 this code has given me problems. The music doesn’t play at all.  
I know the problem might be the onClipEvent(enterFrame), but I can’t figure out how to solve it.  
Does anyone has a solution to this problem?
