alert This appears to be a flash file, you cannot see a preview because flash player is no longer supoorted in browsers, but you can still download the file to study it's source code.
You can open/play the swf file with Flash Player exe
user earthquake
earthquake (2)

FPS increasing and decreasing

A simple code that allows you to set different FPS for each separate clip.
1023 downloads, 15982 views
Download (19.98 KB)

Comments

You need to login to post a comment.

user craigtolputt
craigtolputt 16 years ago

Does this work when you load a movie into another movie? Its just that i have a movie that loads in another and i want the one loaded in to be 50fps but it doesnt seem to speed up.

Where would i put the prototype code? in the root of the loading movie or the root of the loaded movie?

user chosen
chosen 16 years ago

great work

user Revixi5
Revixi5 17 years ago

I used something similar in the past, and each time the movieClip was "reload", the FPS was duplicate... from 20, it was then 40, and 60... Have you ever had a problem like that with your code ? I hope not because this is very usefull, and i would be happy to finally have one that work fine.

user serg85
serg85 17 years ago

Thanks!
It is really good work!!!

user webreake
webreake 17 years ago

nice coding !

user jing1
jing1 17 years ago

nice but maybe you put a little to less effort into the interface ;-)

5/10

user shabith
shabith 17 years ago

nice work... 10/10

user earthquake
the listing author earthquake 17 years ago

Thanks

user Marto
Marto 17 years ago

nice thinking man.

user Dwight
Dwight 17 years ago

It works fine, but retyping it every time I'm gonna use it in a project is to much work for me (I am one of those lasy people :-p ) So I've changed it into a class :-D can I upload it somewhere?

user parpar
parpar 17 years ago

hi earthquake i thank you for your anwser but your code is incomplete ... and it generats errors.

user earthquake
the listing author earthquake 17 years ago

Thanks

parpar;
You can use this code for stopping after 1 loop

MovieClip.prototype.fpshizi = function(fps) {
this.stop();
if (this.fpsayi != undefined) {
clearInterval(this.fpsayi);
delete this.fpsayi;
}
this.nxt = function(ptr) {
if (ptr._currentframe == ptr._totalframes) {
stop();
}
else if (ptr._currentframe<ptr._totalframes) {
ptr.nextFrame();
} else {
ptr.gotoAndStop(1);
}
updateAfterEvent();
};
this.fpsayi = setInterval(this.nxt, Math.round(1000/fps), this);
};

user parpar
parpar 17 years ago

its very good , just what i was llooking for. thanks
but i have 1 question, how do you make it stop after 1 loop ?

stop(); action does not work

user elzap
elzap 17 years ago

interesante

user adrianTNT
adrianTNT (admin) 17 years ago

Its good because I heard many people ask how to change FPS of a single clip and not in complete SWF file.