Controlling the frame rate of a movieclip

I know how to change the frame rate of the whole movie but is there a way to change the frame rate of one movieclip? Thanks for your time.

Mike

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22316&

I’m not talking about external FLA’s, im jsut talking regulary movie clips, any suggestions?

Have you read the thread?

all of the replies, no i guess i jumped the gun :slight_smile:

The only problem is that code works great if you just play the movieclp but if you use a button to play a different frame (not the first frame, then it doesnt work. Suggestions?

Mike

Try:

MovieClip.prototype.setFPS = function(rate, begin, end) {
	this.gotoAndStop(begin);
	this.begin = this._currentframe;
	this.end = end ? end : this._totalframes;
	this.controlFPS = function() {
		if (this.begin != this.end) {
			this.gotoAndStop(this.begin++);
updateAfterEvent();
		} else {
			delete this.control;
			delete this.begin;
			delete this.end;
			clearInterval(this.my_interval);
		}
	};
	this.my_interval = setInterval(this, "controlFPS", 1000/rate);
};
myMovieClip.setFPS(25, 10, 30);
//fps rate,initial frame, final frame