Sound Plays too many times... Code checks out... I think

PolarBearAngry & PolarBearAngry2Normal are sound clips…

function createEnemies():void{

var thisEnemy:MovieClip = new Enemy();

	thisEnemy.roarAngry = new PolarBearAngry()
	thisEnemy.roarAngry2normal = new PolarBearAngry2Normal()
	thisEnemy.roarTransform = new SoundTransform(0.25);
	thisEnemy.roarChannel = new SoundChannel();

actors.push(thisEnemy);

}

createEnemies();


function enemyAi(mover):Number {
	if (mover.chasing) {
		if (mover.startled) {
			soundFactory(mover,mover.roarChannel,mover.roarTransform,mover.roarAngry);

		} else {
			var rand:uint=Math.ceil(Math.random()*5000);			

			if (rand>4950) {
				soundFactory(mover,mover.roarChannel,mover.roarTransform,mover.roarAngry);
			}
		}


		mover.startled=false;

		if (mover.avatar.currentLabel!="Angry") {
			mover.avatar.gotoAndStop("Angry");
		}
	} else {

		if (! mover.startled) {

			mover.newSound=true;
			mover.roarChannel.stop();
			soundFactory(mover,mover.roarChannel,mover.roarTransform,mover.roarAngry2normal);
		}

		mover.startled=true;
}

function soundFactory(sounder,channel,transformer,sound) {
	
	if (**channel.position>=sound.length||channel.position<=0||sounder.newSound**) {
		channel=sound.play();
		channel.soundTransform=transformer;
		sounder.newSound=false;
	}
}

function loopFrame(e:Event):void {

enemyAi(actors[0]);

}
addEventListener(Event.ENTER_FRAME,loopFrame);

Anyway, my problem is with he area in bold… Apparently the “channel.position” is always at 0, even if a sound is playing. So sometimes my sound overlaps itself or plays when it shouldn’t…

any clues?