Hello, I am having trouble pausing an external streaming .swf audio file. At first I was loading external mp3's which does not allow me to create an adaptive buffer so I went with attaching the audio to an external .swf. With an external mp3 it is very easy to pause the audio, however pausing an external .swf is a different story (for me at least). With an mp3 embedded in a .swf I would typically use the following method to pause the sound:
Code:
soundTest = new Sound();
soundTest.attachSound("testMP3");
soundTest.start();
clipLength.text = soundTest.duration/1000+" s";
pauseClip.onPress = function() {
pausePositionS = soundTest.position/1000;
soundTest.stop();
};
startClip.onPress = function() {
if (soundTest.position == soundTest.duration) {
soundTest.start();
} else {
soundTest.start(pausePositionS);
}
};
startClip.onEnterFrame = function() {
currentPosition.text = soundTest.position/1000;
};
How can this same method by applied to calculate the position on the timeline of an externally loaded .swf.
Thank you in advance for the help.
Regards,
Jason
Code:
soundTest = new Sound();
soundTest.attachSound("testMP3");
soundTest.start();
clipLength.text = soundTest.duration/1000+" s";
pauseClip.onPress = function() {
pausePositionS = soundTest.position/1000;
soundTest.stop();
};
startClip.onPress = function() {
if (soundTest.position == soundTest.duration) {
soundTest.start();
} else {
soundTest.start(pausePositionS);
}
};
startClip.onEnterFrame = function() {
currentPosition.text = soundTest.position/1000;
};
How can this same method by applied to calculate the position on the timeline of an externally loaded .swf.
Thank you in advance for the help.
Regards,
Jason