# Problem with sound.position

**URL:** <https://forum.kirupa.com/t/problem-with-sound-position/191138>\
**Category:** flash\
**Created:** [June 17, 2006, 6:31pm UTC](https://forum.kirupa.com/t/problem-with-sound-position/191138 "2006-06-17T18:31:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gloqui](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@gloqui](https://forum.kirupa.com/u/gloqui)\
**Post date:** [June 17, 2006, 6:31pm UTC](https://forum.kirupa.com/t/problem-with-sound-position/191138/1 "2006-06-17T18:31:02Z")

</div>

Hi, I have a problem with the sound position.

I have a MC with some animations, and I need them to play when a sound is set on an specific position. This what I did:

sonido = new Sound();  
sonido.loadSound(“audio/s1.mp3”,true);  
this.onEnterFrame = function () {  
\_root.posicion = sonido.position  
if (\_root.posicion==5564) {  
this.textos\_senal.gotoAndStop(2);  
}  
else if (\_root.posicion==10214) {  
this.textos\_senal.gotoAndStop(3);  
}  
else if (\_root.posicion==16536) {  
this.textos\_senal.gotoAndStop(4);  
}  
else if (\_root.posicion==24424) {  
this.textos\_senal.gotoAndStop(5);  
}  
else if (\_root.posicion==28003) {  
this.textos\_senal.gotoAndStop(6);  
}  
else if (\_root.posicion==36807) {  
this.textos\_senal.gotoAndStop(7);  
}  
}

The problem is that sometimes the AS works fine, in other cases, it doesn’t and I don’t know why.

What am I doing wrong? Pleaseee, someone help me with this.
