I just used this code to get my sound play and added some functions. On button press the sounds starts playing or stops. But once it reached the end I can't get the sound play again, just when I reenter the frame from a different one. Help would be great.
var sound:CCTVSound = new CCTVSound();
var soundChannelPosition:Number = 0;
var playSound:Boolean = false; //this is what I thought should help to see if the end of the sound is reached to allow to play again, but don't know how to finish the code...
if (soundChannel == null)
soundChannel = sound.play(soundChannelPosition);
soundChannelPosition = soundChannel.position;
soundChannel = null;