It seems few of you guys yet to understand how sound works in flash.
I have already written something here http://www.sothink.com/phpBB2/viewtopic.php?t=28316
about Sound in SWF QUICKER (or in flash) but it seem some of you do not realy search the forum but even thought I have said that, this time I have made Pausing and Resuming a Sound tutorial and hope it will be useful for users here.
Tutorial : for Pausing and Resuming a Sound
Discussion accroding in one of my flash books
The Sound class does not provide built-in methods to pause and resume a sound. However, with a little bit of code, you can achieve the same result. The key is to store the sound's position property before stopping (pausing) the sound and then use that value to tell Flash at what point to resume playback.
Therefore, to pause a sound:
Get the value of the sound's position property and store it in a variable:
pauseTime = mySound_sound.position;
Call the stop( ) method:
And when you want to resume the sound, simply do the following:
Convert the stored position, in milliseconds, into a starting offset, in seconds, by dividing by 1000.
Call the start( ) method and pass it the appropriate value for the offset:
And I come up with following code and it works great .
// This code has been used in the demo
// this code will load the external audio
mySound = new Sound();
mySound.loadSound("your Audio file.mp3", false);
//code for pause button to stop a sound
pauseButton.onRelease = function ()
// this code will disable stop button when clicked once
playButton.enabled = true;
pauseButton.enabled = false;
//code for play button to resume a sound
playButton.onRelease = function ()
// this code will disable play button when clicked once and then enbles the stop button
playButton.enabled = false;
pauseButton.enabled = true;