# Probs With Sounds

**URL:** <https://forum.kirupa.com/t/probs-with-sounds/301114>\
**Category:** flash\
**Created:** [December 3, 2009, 6:14pm UTC](https://forum.kirupa.com/t/probs-with-sounds/301114 "2009-12-03T18:14:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimacy](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Post date:** [December 3, 2009, 6:14pm UTC](https://forum.kirupa.com/t/probs-with-sounds/301114/1 "2009-12-03T18:14:05Z")

</div>

Hi. Im doing a little game with three kinds of enemies. When each enemy blows up I’m trying to put in a different sound. Right now I get sound for my first enemy and none for the other two. The code is the same for all(?). Here’s the code:

from my main ship\>

function onLoad()  
{  
\_root.backGroundMusic=new Sound(); // mine  
\_root.miniBossBlow=new Sound(); //mine  
\_root.enemyBlow=new Sound(); //mine  
\_root.shot= new Sound(); //mine  
\_root.soundFX= new Sound(); //mine trying to get more sounds

from my enemy ship class(this one works)\>

function explode()  
{  
\_root.enemyBlow.attachSound(“bigExplosion1.mp3”);  
\_root.enemyBlow.start();

from miniBoss class(no sound)\>

function explode()  
{  
\_root.miniBossBlow.attachSound=(“miniBossBlow1.mp3”);  
\_root.miniBossBlow.start();

from my boss class(no sound)\>

function explode()  
{  
\_root.bossBlow.attachSound=(“bossBlow.mp3”);  
\_root.bossBlow.start();

i have NO idea but will continue 2 scrabble around blindly 'till someone throws me a bone:stare:
