Global function to stop/start timelines

I was wondering if someone could shed some light in helping translate a AS2 function to AS3. It stops the movie’s timeline from where you called the function. Thanks much.
[LEFT]


MovieClip.prototype.wait = function(n:Number) {
    this.stop();
    this.myInterval = setInterval(mx.utils.Delegate.create(this, function () {
        this.play();
        clearInterval(this.myInterval);
    }), n*1000);
};

[/LEFT]