Fps (urgent)

just a quick question kinda urgent is there a way of making the fps of parts of a movie e.g. the buttons faster than the rest i need my buttons to fade fast but the rest of it a little slower

-Tom

well… not that I know of… I think the only way is to make one animation longer, the other shorter or was it… the other way around! Well… one has more frames and the other less… :slight_smile:

Its possible with this lil tid bit of code:

function playNextFrame() {
	_parent.nextFrame();
}
setInterval(playNextFrame, 2000/2000 ); 

Convert your buttons to movieclips then place that code on a new layer and on the first frame. As of right now the code is set at 2000 fps so adjust the numbers to whatever suits you. I attached a simple fla to help you see what I’m talking about. Hope it helps. =)

Dammit, i forgot the fla…
Here it is. =)

ahhh! why didn’t think of that???

Here is a handy one and easy to use:

Put this script in ur _root timeline:

// Set the FPS you've set in Flashmovie...
_root.orgFPS = 40;

function internal(sender) {
     if (sender._currentframe == sender._totalframes) {
          sender.gotoAndStop(1);
     }
     sender.nextFrame();
     updateAfterEvent();
}

MovieClip.prototype.play = function(fps) {
     if (!fps) fps = _root.orgFPS+2;
     fps = 1000/fps;
     unique = setInterval( _root.internal, fps, this);
}

MovieClip.prototype.stop = function() {
     clearInterval( unique );
}

(** Usage: **)

MovieClip.play(fps);//set ur fps here :)
MovieClip.stop();

Hope it helps,

yours,
h88

cheers guys thats wot i was lookin for i aint must of a scripter