Need delay after detecting the sound

I need to place a delay as soon as the “this.gotoAndStop(currentFrame + 30);” is executed. the purpose of this script is to move the timeline after mic read the sound in time interval of 5 sec… for example, current frame is 1 then after detecting the sound through mic it should goto and stop at 31, again on sound detecting it should move to 61 and so on…

Any response will be high appreciated.
Thanks in advance…

import flash.display.FrameLabel;
var myMic:Microphone = Microphone.getMicrophone();
myMic.setUseEchoSuppression(true);
myMic.setLoopBack(true);
var st:SoundTransform = new SoundTransform(0);

this.addEventListener(Event.ENTER_FRAME,startSpeaking);// creates enterframe event
function startSpeaking (e:Event)
{

			if(myMic.activityLevel== -2 || myMic.activityLevel<=50)
			{
				stop();				
				myMic.soundTransform = st;
							
			}
			else
			{
		 	this.gotoAndStop(currentFrame + 30);
			myMic.soundTransform = st;
			}
		}