[AS3] Controlling the fps os a movie clip

I have a movie clip that runs a swf which I need to control the speed of.
I have used play() stop() etc for doing the obvious but can I control the fps using a slider?

I know that you set the fps when creating the output but I need the user to be able to speed up and slow down the swf.

I have had a good look online but cant find much about it.

Any hints or directional advice would be great :slight_smile:

frameRate - d’oh

Use setinterval()
10,000 post’s? obviously not flash you have not been posting about:)

Lol, thanks Paul.
How does setInertval differ from frameRate and why use it?

PHP is my main area but am looking at different languages for different projects :slight_smile:

A flash move will play at what ever frame rate you set in the fla publish settings, or as close as the end user system will allow.
But…
Let say you have it set at 21 fps. it plays fine but some animation could do with being increasingly faster.
Well instead of just letting that movie clip play at the normal rate set in the fla you could use setInterval instead.
Examples:
//Will try to play at what ever is set in the fla


stop()
this.onEnterFrame=function(){
this.gotoAndStop(this._currentframe+1)
}

This will play as close to what the end user system will allow:


stop()
var frameint:Number=0
frameint = setInterval(moveFrame,200);//trigger moveFrame every 200th of a second ignoring fla fps set rate
function moveFrame(){
gotoAndStop(_currentframe+1)
}

More information here

hope it helps