No it won't because of this line that calls a toggle function based on the current fps.
if(buffer == 0) adjustQuality()

function adjustQuality():void{
        fps = (fps == 45) ? 20 : 45     
        trace("qulaity is now adjusted to : " , fps )
}

On 13-08-10 16:58, Cor wrote:
In case the framerate get>= 45, wouldn't this put the framerate up to a
endless high number?

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ktu
Sent: vrijdag 13 augustus 2010 16:36
To: Flash Coders List
Subject: Re: [Flashcoders] Could this be done more elegant.

This doesn't change the way it works, but you could rewrite the addValue
stuff to this:

buffer += (fps>= 45) ? 1 : -1;



On Fri, Aug 13, 2010 at 4:45 AM, Jiri<[email protected]>  wrote:

Thanx for the answer, I am on a project where the whole thing is allready
set up. The quality is now set to BEST as soon as the FPS goes under 30 (i
used 45 in my example), but on fast machine this results in very short
graphical glitches, because it is usually only 1 or 2 frames where the FPS
is below 30.
I wanted to prevent this and make the profiling a bit better. Not toggle
all the time, but just wait a bit before doing the call.

So it is not so much about the execution based on EnterFrame but more on
how to write the function a bit cleaner.

Jiri


On 13-08-10 10:29, Henrik Andersson wrote:

I use a different event than what you are most likely using. I use the
Render event. It is a bit more effort since you have to request it again
and again, but it is more accurate for the rendered fps.

It differs from the enter frame event in that it is not dispatched when
the player is skipping frames.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  _______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to