View Full Version : refresh rate = frames or ?
waffe
November 23rd, 2002, 04:38 AM
I believe if you have something like
if (loop.posistion = .963){
trace("HI")
You will probably never see the trace because the if statement only refreshes at the rate of your current fps.
What about action loops?
for (i=0; i<10000; i++){
listbox.additem(HI + i)
What rate do they work at. Do they go as fast as the computer will / Flash, or do they also refresh at the fps rate?
andr.in
November 23rd, 2002, 04:52 AM
fps
if you have onClipEvent(enterFrame {}
that will be fps too...
pom
November 23rd, 2002, 05:34 AM
Loops are executed within the frame, whatever happens. So basically as fast as your processor can. I don't know how many calculation the average processor can take, but probably no more than a few thousands. When you go beyond that, it will start lagging (to do all the calculations you asked him to do) and eventually drop frames.
pom :asian:
andr.in
November 23rd, 2002, 05:39 AM
oh...
:cyclops:
waffe
November 24th, 2002, 02:21 AM
So,
if (loop.posistion == .963){
trace("HI")
refreshes at fps rate and,
for (i=0; i<10000; i++){
listbox.additem(HI + i)
refreshes at the speed of your computer?
If this is the case how could I put
if (loop.posistion == .963){
trace("HI")
into a loop function
My reasoning is I would like to use the faster refresh time, so flash will be able to see "loop.position == .963." At the current refresh rate = my fps, the “if function” is not fast enough.
pom
November 24th, 2002, 08:13 AM
Nope the loop doesn't refresh the way you'd expect it to refresh. This is definitely not a good idea. You'd better try instead to approximate that value.
pom :cowboy:
waffe
November 24th, 2002, 04:57 PM
OK, if I'm stuck with the approximant value, is there a way to speed the refresh rate up so the approximant value can be small. If I use a higher fps the refresh will increase but so will the rest of my movie. Is there a way to increase the fps of my if function movie clip without increasing the fps of my main movie.
pom
November 25th, 2002, 07:20 AM
Why don't you check if it is superior to 0.963? That way you don't have to approximate anything.
pom :)
waffe
November 25th, 2002, 02:15 PM
I don't know what you mean by "check if it is superior to 0.963?",
but this is what I tried.
if (_root.lp.position/1000==.963){
trace("HI")}
The trace never happens. About as close as I can get with it missing every once and a while is
(_root.lp.position/1000>=.0 && _root.lp.position/1000<=.05){
trace("HI")}
I would like it to be flawless, of course so close, but so far away.
:*(
pom
November 26th, 2002, 04:51 AM
if (_root.lp.position/1000>=.963){
trace("HI");
}It this is not doing what you want, well, post a fla, hopefully someone can have a look at it.
pom :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.