Component to change individual mcs' fps

Here’s a component to drop onto an mc to control the frames per second independent of the main fps. Only thing is you can’t exceed the main fps. So if your main fps is 30, you can make other mcs play at anything except over 30.

I don’t know if this is really useful, now that we have the setInterval function… Did you look at the code, Flex? Because I can’t do i t from this computer.

pom :asian:

I know you can use the setInterval, but you can just drag the component on an MC set the fps (can change some other effects too - although I couldn’t get the effects to work). It easier to use for people not too familiar with actionscript - so, it will be useful to them.

It worked fine on my comp. but like I said - the “effects” (forward, reverse, ping pong, etc.) didn’t.

Of course, of course. But did you look at the source? Is it based on setInterval or getTimer? Just curious :slight_smile:

pom :asian:

Just to add - not everyone here is on the same level as another - if someone is just starting out in action script - or someone just wants a drag and drop solution - it would help them, but to a code junkie - it would be of no benefit. I don’t “assume” who I’m speaking to when I post something. Most of the thing I post here are for new starters anyway, not for the ones who already have their feet wet…

I’m not sure… that is if it’s getTimer() or setInterval() - I’d presume setInterval…

This is the authors intro…

<p class=“titleStyle”>FPS Controller Documentation</p>
<p class=“subTitle”>Introduction</p>
Flash allows for frame rates between 1 and 120. Once set, this global framerate cannot be modified at runtime. FPS Controller allows you to programatically change the framerate of any movieclip in flash.
<br/><br/>
You cannot however attain framerate greater than what is set in the authoring environment. With the FPS Controller Different movieclips can have different framerates and since the main timeline is also a movieclip you can modify it’s framerate as well!
<br/><br/>
All you have to do is drag the component from the components panel onto the movieclip and set the parameters. Using this component you can also alter the default play direction of the timeline to play backwards, or even alternate between forward and backward play direction.(ie:- PingPong). The version 2 adds another playMode namely, Random to the component. Random playMode goes to any random keyframe while still maintaining the framerate.
<br/><br/>
With this version, you have non-linear control over the frame rate. All you do is use the prefix “F” before the frame changing action like FgotoAndStop (5). That’s it. Controlling non-linear frame rate is now a breeze.<br/><br/>
You can also change the FPS of any movieclip at runtime, using the method
<br/>
setFPS (your fps)
<br/>
You may also change the target of the fpsController using the method<br/>setFPSTarget (your movieclip).
<br/>
The playMode can also be modified at runtime by using the method,<br/>setPlayMode (your playMode).
<br/><br/><br/>
I have added a few samples for this component to further help in understanding the usage of this extension. They can be found in the samples folder uder you flash installation directory. On windows 2000 or XP, this can be found at
<br/>
C:\Documents and Settings\user name\Application Data\Macromedia\Flash MX\Configuration\Samples,
<br/>
where user name is generally the name of you computer.
<p class=“codeStyle”>with best regards,<br/>
darshan sawardekar
</p>

The FPS Controller component will appear in the components panel in flashMX after installation.
The sample files can be found in the samples folder of your flash MX directory. Comprehensive documention can be found under the FPS Controller folder in the reference panel.

Thanks :slight_smile:

*Originally posted by flex *
**Just to add - not everyone here is on the same level as another - if someone is just starting out in action script - or someone just wants a drag and drop solution - it would help them, but to a code junkie - it would be of no benefit. I don’t “assume” who I’m speaking to when I post something. Most of the thing I post here are for new starters anyway, not for the ones who already have their feet wet… **
I hope I didn’t piss you off :-\ I was just trying to give a bit of info, that’s all…

Not at all mate - Also - it’s actually based on getTimer().