setInterval() is just a timer in milliseconds before it calls something, I am
looking for a way of actually changing the whole movies framerate, the
framerate you set in the movies properties when you are creating it.
[quoted text, click to view] > setInterval() is just a timer in milliseconds before it calls something.
yep, here it is again. the code below the dotted line adds another method to
the movieclip class. you can play any movieclip at any frame rate (that the
host computer can handle) in any direction:
to use, specify the movieclip, frame rate and frames to play - forward or
backward, doesn't matter:
yourMC.playF(1,yourMC._totalframe,33);
------------------------------------------------------------------
MovieClip.prototype.playF = function(m, n, fps) {
if (!var3141592) {
var3141592 = 0;
playA = new Array();
}
this.m = m;
this.n = n;
this.fps = fps;
this.gotoAndStop(this.m);
playA[var3141592] = setInterval(playF2, 1000/this.fps, this, var3141592);
var3141592++;
};
function playF2(mc, ind) {
if (mc.m<mc.n) {
mc.nextFrame();
} else {
mc.prevFrame();
}
if (mc._currentFrame == mc.n) {
clearInterval(playA[ind]);
}
updateAfterEvent();
}
if all movieclips in your swf are playing and they don't loop you can use:
yourBtn.onPress=function(){
fpsControlF(_root,1);
}
yourBtn.onRelease=function(){
fpsControlF(_root,12); // <- use your "original" frame rate here instead of 12
}
function fpsControlF(mc,fps){
for(obj in mc){
if(typeof(mc[obj])=="movieclip"&&mc[obj]._name==obj){
mc[obj].playF(mc[obj]._currentframe,mc[obj]._totalframes,fps);
fpsControlF(mc[obj],fps);
}
}
}
kGlad to hear. Thanks. I can't figure out what m and n are (I guess fps =
frames per second).
I want to make a transparent button over nested MC animation which, when
pressed, slows the frame rate of everything to around 1 fps, and then, when
released, returns all to the original speed.
I don't know how to use this code.
no, not through email. i have too many people that keep sending me things once
i've given them my email address.
you can upload your fla on a server. if you don't have a server now, you can
obtain space on a free one like geocities.
I just created a site at Geocities and have uploaded the file there.
ID: jamtester
password: GIaKUn
yes, the code below the dotted line must execute before the playF() method is
used. in addition, the playF() method assumes the movieclip to which it is
applied does not loop and that appears to NOT be the case in your project. it
appears that all the movieclips, to which that code would apply, loop. is that
true?
That does it. My movie has to be adjusted a lot but I think I know how.
Don't see what you're looking for? Try a search.