Why isn't the end position of a sound channel the same as the length of a sound?
public function play():void
soundChannel = sound.play();
private function onSoundComplete(e:Event):void
var endPosition:Number = soundChannel.position;
var length:Number = sound.length;
If you test the previous code you will see that the position of the soundChannel when SOUND_COMPLETE is dispatched is different then the length of the sound.
Why isn't the soundChannel play all the sound? Why does it stops earlier? and how can I find the end position of the soundChannel without playing and listening to the SOUND_COMPLETE event?
I see no one has answered your question. I don't have an answer either, but I'm experiencing similar problems with the SoundChannel position. The problem with tracking the sound object's position through its sound channel gets worse when there is more than one Flash movieclip open in a different browser window. Opening a Flash audio player seems to work fine if it is the only Flash movieclip open on my desktop. After I open another Flash object in a separate window, the audio player fails to properly track the SoundChannel position, and fails to correctly fire the SoundComplete event.
Anyone else experiencing these problems? Has anyone been able to find a reliable method for tracking the sound channel position with more than one Flash movieclip open on the desktop? Is this a known issue or bug with the Sound API for Flash Player 10? We could really use some answers.