I am trying to get sounds working in my game and would like to have different sounds play and loop depending on where my player.mc is within its parent mc (game.mc).
So if my game.mc is 1000 pixels wide and player.mc.x is <= 500 it will play and loop sound1, and if player.mc.x is > 500 it will play and loop sound2.
I have the playing and looping done with a SOUND_COMPLETE listener but if one sound is playing and player.mc moves from one “zone” into the other I cant get the sound to stop and the new one to start. Currently it will only play the new sound once the previous sound ends.
I have probably gone about it all wrong and there will be a much simpler way to achieve this but I cant work it out. What is the best way to do this?