Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pause an external streaming audio .swf - Flash MX 2004

Status
Not open for further replies.

GD03

Programmer
Oct 20, 2003
22
0
0
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top